Best way to split a single string containing 2 words into word1 and word2

Whats the best way to take a string containing 2 words and split it into 2 strings ?
eg. "red ferrari"
string1 "red"
string2 "ferrari"

If your list is always going to have exactly two words, then yes.  Otherwise it depends on your requierments.

Similar Messages

  • Best way to split large partition in multiple small partitions

    Looking for some ideas here. We ended up having a large/huge partition, the last one (because of maxvalue), while other partitions have similar number of records. What's the best way to split this large partitions with has about 3 years worth of data into separate partitions based on Month/Year. I tried with SPLIT partition, I not able to figure out a way to specify a value where I can like to split.
    Any thoughts, ideas appreciated.
    Thanks

    I'd be inclined to split off that partition as a stand-alone table. Create new partitions and then reload the data. But that "inclined" would depend on the available maintenance window and the amount of data and the Oracle version number none of which you mention.

  • Best way to split 3D project with constantly moving cameras

    I created a 1 minute project in which the camera travels between 3 sets, while there is an animated 2D background. The background consists of overlaying .psd files which move around. The camera sweeps each set and then zooms to the next. Within each set are .mov and .psd files with tons of keyframing (although not too many filters). I think I'm starting to hit the outer limits of my hardware. I have it set to render draft quality for now, and it's still functional. I'm wondering what would be the best way to split it into smaller files, yet retain smooth motion of the camera between sets? I still need to fine tune the duration of each set, so I'm a little hesitant to break it up a this point, but may need to do so anyway. Thanks in advance.

    Ok, I did it. Project complete. It turned out that I did have enough RAM, just not enough to RAM preview it all. I did flatten quite a bit of it prior to the camera moves. And an additional challenge was when I wanted to add a 5 second clip at the beginning. I wound up adding a second camera because all my timing was thrown off.
    Anyway, here's a link to the final video.
    http://www.youtube.com/watch?v=McBqVzrejNw
    Hey Bogie, I was thinking of starting a separate thread in the FCP or Compressor forums with recommended encodes for getting this monster of a file on the web. I tried several iterations and finally found one that both looked good, was big enough to watch, and small enough to load quickly. Does it make sense to start a new thread for which I already have the answer?

  • What is the best way to export the data out of BW into a flat file on the S

    Hi All,
    We are BW 7.01 (EHP 1, Service Pack Level 7).
    As part of our BW project scope for our current release, we will be developing certain reports in BW, and for certain reports, the existing legacy reporting system based out of MS Access and the old version of Business Objects Release 2 would be used, with the needed data supplied from the BW system.
    What is the best way to export the data out of BW into a flat file on the Server on regular intervals using a process chain?
    Thanks in advance,
    - Shashi

    Hello Shashi,
    some comments:
    1) An "open hub license" is required for all processes that extract data from BW to a non-SAP system (including APD). Please check with your SAP Account Executive for details.
    2) The limitation of 16 key fields is only valid when using open hub for extracting to a DB table. There's no such limitation when writing files.
    3) Open hub is the recommended solution since it's the easiest to implement, no programming is required, and you don't have to worry much about scaling with higher data volumes (APD and CRM BAPI are quite different in all of these aspects).
    For completeness, here's the most recent documentation which also lists other options:
    http://help.sap.com/saphelp_nw73/helpdata/en/0a/0212b4335542a5ae2ecf9a51fbfc96/frameset.htm
    Regards,
    Marc
    SAP Customer Solution Adoption (CSA)

  • Hi all! What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    Buying more hard drive space is a very valid option, here.  Editing takes up lots of room, you should never discount the idea of adding more when you need it.
    Another possibility is exporting to MXF OP1a using the AVC-I codec.  It's not lossless, but it is Master quality.  Plus the file size is a LOT smaller, so it may suit your needs.

  • HT3819 what is the best way to set up my childs iphone with apple id and as part of home sharing?

    what is the best way to set up my childs iphone with apple id and as part of home sharing?

    So do I have to hook up an Ethernet cable to both the Uverse AND my computer from the Time Capsule?
    I'm not sure that I understand everything that you want to do and where devices will be located.
    The Time Capsule must connect to the "main" Uverse router using a permanent, wired Ethernet cable connection. An Ethernet cable can be run up to 300+ feet with virtually no loss, so you should be able to locate the Time Capsule wherever you want.....unless you have a very large estate.
    If you want the Time Capsule to strengthen the wireless signal provided by the Uverse router, then the Time Capsule must be located in the area where you need that additional signal strength.
    If I understand your post correctly, you plan to install the Time Capsule in the office? When you do this, you can configure the Time Capsule to create a wireless signal that uses the exact same wireless network name and password as the Uverse wireless network.
    That will provide a much stronger signal for your Uverse wireless network in the office area. Hopefully, the bedroom that you mention is close to the office, so it will pick up the stronger wireless signal from the Time Capsule.
    The iMac in the office can connect to the Time Capsule using another short Ethernet cable connection, or the iMac can connect using wireless.  A wired connection is always preferred, if possible.
    At this point, I guess the first question would be.......
    Do you have a location for the Time Capsule that will be close to the office....and...the bedroom where you want a stronger wireless signal?

  • Best way to remove apostrophe from string when loadiing

    Hi using an insert statement to load data some apostrophe's in string .
    We need to ensure all aposrophe's removed from such strings on loading/.
    What is best way to achive ethis.
    Uisng 11.2.0.3
    Thanks

    Use replace fucntion
    Please post ur DDL and DML for the table
    For examples you can see this
    how do i replace  single quotes in a string with say  ''  or null
    select replace('ab''''''''cd','''',' ') from dual;
    CREATE TABLE my_table
         istrng  varchar2(33)
    insert into my_table
    select replace('ab''''''''cd','''',' ') from dual;Please mark your questions as answered
          user5716448     
    Handle:      user5716448 
    Status Level:      Newbie
    Registered:      Mar 16, 2010
    Total Posts:      343
    Total Questions:      131 (80 unresolved)Edited by: Rahul India on Jan 29, 2013 6:04 PM

  • What is the best way of converting everything in a result set into a string

    hello folks
    What do you think is the best way of converting everything in a resultset into a string???
    At the moment I'm using
    rs.getString(i);
    everywhere (no matter if the underlying datatype is a date or whatever..) it converts automatically evertything expect NULL into a valid string.
    Are there better (simple to use..) ways?

    I don't see a big switch construct. How about trying the following:
    Call this method from your original method by passing the resultset obtained.
    public String[] convert(ResultSet rs) {
         int col = ((ResultSetMetaData) rs.getMetaData()).getColumnCount();
         String[] record = new String[col];
         int i=0;
         while(rs.next()) {
              if(rs.wasNull()) record[i] = new String();
              else record[i] = rs.getString(i);
              i++;
         return record;
    iDriZ

  • Best way to "split" iPhoto library?

    Usually, at the beginning of the year I create a new, clean library for iPhoto. This helps me keep my library size managable. Well, this year I forgot to do it and now my iPhoto library contains pictures from 07 and 08. Is there an easy way to split my iPhoto library? How do I create a new library with my 08 pictures? There must be a way to do it. I know what events I want to move to a new library I'm just not sure how to go about doing it.

    Welcome to the Apple Discussions.
    iPhoto Library Manager will copy Events and well as Albums, for further information consult the Help on the app or contact the Developer.
    I have an external network drive to store the libraries so I also want to experiment with sharing those libraries with my wife
    Users have consistently reported problems when using a disk not formatted for OS X (such as a NAS) with iPhoto. These issues include problems sharing, problems saving changes and others. I would not recommend using iPhoto on any disk not formatted for OS X.
    Regards
    TD

  • Best way to split a site in two?

    I have a site I am revising. The site and its subfolders are located like this
    Macintosh HD
    ......Business folder
    .........Mysitename.site
    .........Mysitename.settings
    .........Mysitename.data
    Is that as it should be? Seems so but prefer to ask and be sure.
    After revising, I plan to split the site into two sites. I suppose the best way to do that is to hit Save As... Is that in fact the best way? What happens then to the .data and .settings folders? Do they copy properly? Do they end up in the right place?
    And last:
    In each version, I plan to delete some pages so there are now two related sites, each with its own similar but not matching collection of pages. Can I simply, in each version, delete one page at a time? 
    My best guess is, after deleting pages, I should recheck links with command-5 the Links In /Out palette. Is that the best way?
    Thanks.

    Larry,
    If I understand it in the right way, you can do as you plan. You may, outside GoLive:
    1) Create a new folder (like Business 2 folder) and copy everything from inside Business folder into it;
    2) In each folder (Business/Business 2), delete and/or add things as needed;
    Then you may open GoLive, open each of the site files, press the Refresh button, and recheck links.

  • Best way to split Aperture Library

    This is my current setup:
    Aperture 3 running on my Macbook Pro with referenced masters. Both library and masters reside on the 500GB macbook. HD space is starting to get a bit tight and now I would like to split the library into 2 (by years probably, haven't decided) and put one library (the least used) on my iMac and continue to use the MB as the primary workstation.
    What is the best way to do this split? I know I can export as a new library in A3 and have it consolidate masters into library. I'm assuming when I do this consolidation it just copies the masters to the new library. This would not solve my HD space issue as the original referenced masters would still reside on my MB.
    Any suggestions are greatly appreciated. Thanks

    Based on what you said so far, still the best option is an external HD. You do not need to take the HD with you every place you go. When you are mobile, tell Aperture to Store Files in Aperture library as you do now. When you return, tell Aperture to Relocate Masters. It's job done. You will free up a lot of HD space and with a Referenced Masters set up you should see some performance improvements. Allan
    PS you have two Allan's trying to assist.

  • Best way to break down a string?

    Hi.
    I am wondering, what is the best way to get all the substrings with a patten from a string.
    Here is an example.
    String str = "|hello|123456|a,b,c,d,e,|"
    i want to get all the substrings between 2 consecutive "|" symbols.
    hello
    123456
    a,b,c,d,e,
    is there a build in method to achieve it? Read it char by char is the only way?
    what do you think is most efficient way of doing it?

    Hi.
    I am wondering, what is the best way to get all the
    substrings with a patten from a string.
    Here is an example.
    String str = "|hello|123456|a,b,c,d,e,|"
    i want to get all the substrings between 2
    consecutive "|" symbols.
    hello
    123456
    a,b,c,d,e,
    is there a build in method to achieve it? Read it
    char by char is the only way?
    what do you think is most efficient way of doing it?i would use the substring command and look for the index's of the characters you wan't it saves a lot of space compared to the charAt command.. something kinda like this(you prob need to fix it up some)
    )String str = "|hello|123456|a,b,c,d,e,|"
    int index = 0
    while (front < str.LastindexOf("|")
          frontindex = str.indexOf("|",front)
          backindex = str.indexOf("|",front+1)
          newstr[index] = str.substring (front, back)
    index++
    }

  • Best way to split itunes account?

    So I have just graduated from high school and I am moving onto college in the fall. Me and my sister have shared an itunes account for forever (mainly PC used) now but since I just got a macbook for college I am looking for and easy way to split these accounts so that she has her own. My original idea was to make her her own under her own e-mail and import all of our shared music from a back up, similar to importing a cd. Then I would import the songs to my mac book (older purchases and songs off CDs not downloadable through cloud). at this point I could go through and delete any of her songs that I didn't want and she could do the same. this would give us our own libraries and the new downloads would come to each separate account based on the purchaser. I am almost positive that this is the best way to do this but if anyone has any input, tips or completely separate suggestions I would love to hear them.

    cjover94 wrote:
    My only question is if these songs are burned to a USB storage device wont they be able to be burnt to her account
    but wont they still be transferred to her new account?
    They can be used in her iTunes library (on a computer) but they will always be part of your iTunes account (used to make purchases).

  • Best way to implement extension to String

    I have an webapp that displays data taken from a database, and I have lots of Strings that need to be tweaked for HTML display. For example, I want to replace Ca2+ with Ca<sup>2+</sup>.
    So currently I have a static method that takes care of this
    public static String formatForHTML(String input) {
            input = input.replace("Ca2+", "Ca<sup>2+</sup>");
            input = input.replace("Cs+", "Cs<sup>+</sup>");
          etc etc
            return input;
        }which gets called from various places:
    public String getComments() {
            return Format.formatForHTML(comments);
        }I feel that a better way of doing this would be to make a lightweight class - essentially I want to do something like this
    public class SpecialString extends String{
    public String formatNicely{
      String temp = this;
      temp = temp.replace("Ca2+", "Ca<sup>2+</sup>");
      etc.
      return temp;
    }This would allow me to do this
    SpecialString s = "An interesting ion is Ca2+";
    out.println(s.formatNicely());While still allowing me to use all the String methods
    int length = s.length();
    String start = s.subString(0,3);I know that String is final, so I can't do the above. The obvious thing is to make a lightweight class that uses a String internally
    public class SpecialString{
        private String s;
        public SpecialString(String init){
        this.s = init;
        public String formatNicely(){
            String temp = s;
            temp = temp.replace("Ca2+", "Ca<sup>2+</sup>");
            etc.
            return temp;
    }This is fine, and allows me to do
    SpecialString s = "An interesting ion is Ca2+";
    out.println(s.formatNicely());BUT I now don't have access to all the other String methods
    SpecialString s = "An interesting ion is Ca2+";
    int length = s.length();  // no such methodI can add an accessor
    public class SpecialString{
        private String s;
        public SpecialString(String init){
        this.s = init;
        public String formatNicely(){
            String temp = s;
            temp = temp.replace("Ca2+", "Ca<sup>2+</sup>");
            etc.
            return temp;
        public String getSpecialString(){
           return this.s;
    }and now call
    SpecialString s = "An interesting ion is Ca2+";
    int length = s.getSpecialString().length();  // OK nowOR I can manually add methods to my SpecialString class
    public class SpecialString{
        private String s;
        public SpecialString(String init){
        this.s = init;
        public String formatNicely(){
            String temp = s;
            temp = temp.replace("Ca2+", "Ca<sup>2+</sup>");
            etc.
            return temp;
        public int length(){
             return this.s.length();
    }and call
    SpecialString s = "An interesting ion is Ca2+";
    int length = s.length();  // also OKBoth of these solutions seem like a lot of extra code. Is this just a feature of the Java that I have to live with, or is there a better way to do this?

    mojones wrote:
    I have an webapp that displays data taken from a database, and I have lots of Strings that need to be tweaked for HTML display. For example, I want to replace Ca2+ with Ca<sup>2+</sup>.
    So currently I have a static method that takes care of this
    public static String formatForHTML(String input) {
    input = input.replace("Ca2+", "Ca<sup>2+</sup>");
    input = input.replace("Cs+", "Cs<sup>+</sup>");
    etc etc
    return input;
    }which gets called from various places:
    public String getComments() {
    return Format.formatForHTML(comments);
    }I feel that a better way of doing this would be to make a lightweight class - essentially I want to do something like this
    public class SpecialString extends String{
    public String formatNicely{
    String temp = this;
    temp = temp.replace("Ca2+", "Ca<sup>2+</sup>");
    etc.
    return temp;
    }This would allow me to do this
    SpecialString s = "An interesting ion is Ca2+";
    out.println(s.formatNicely());While still allowing me to use all the String methods
    int length = s.length();
    String start = s.subString(0,3);I know that String is final, so I can't do the above. The obvious thing is to make a lightweight class that uses a String internally
    public class SpecialString{
    private String s;
    public SpecialString(String init){
    this.s = init;
    public String formatNicely(){
    String temp = s;
    temp = temp.replace("Ca2+", "Ca<sup>2+</sup>");
    etc.
    return temp;
    }This is fine, and allows me to do
    SpecialString s = "An interesting ion is Ca2+";
    out.println(s.formatNicely());BUT I now don't have access to all the other String methods
    SpecialString s = "An interesting ion is Ca2+";
    int length = s.length();  // no such methodI can add an accessor
    public class SpecialString{
    private String s;
    public SpecialString(String init){
    this.s = init;
    public String formatNicely(){
    String temp = s;
    temp = temp.replace("Ca2+", "Ca<sup>2+</sup>");
    etc.
    return temp;
    public String getSpecialString(){
    return this.s;
    }and now call
    SpecialString s = "An interesting ion is Ca2+";
    int length = s.getSpecialString().length();  // OK nowOR I can manually add methods to my SpecialString class
    public class SpecialString{
    private String s;
    public SpecialString(String init){
    this.s = init;
    public String formatNicely(){
    String temp = s;
    temp = temp.replace("Ca2+", "Ca<sup>2+</sup>");
    etc.
    return temp;
    public int length(){
    return this.s.length();
    }and call
    SpecialString s = "An interesting ion is Ca2+";
    int length = s.length();  // also OKBoth of these solutions seem like a lot of extra code. Is this just a feature of the Java that I have to live with, or is there a better way to do this?you could store into the database both strings- one without the html and another with the html

  • What is the best way to split large blocks of text into smaller blocks?

    Hello, I have several pages with 2,000 word articles of text. As you can imagine these pages are not terribly interesting design-wise, something I plan to change.
    The first thing I need to do is split up these blocks of text into much smaller blocks so that they can easily be moved around and independently manipulated. What's the quickest way to do this in Muse?

    You can create different text frames and copy the text, which if you wish you can group them together which will help in moving them around on page.
    Thanks,
    Sanjit

Maybe you are looking for