NSString Category Methods Question

I'm trying to put together an NSString category to handle a bunch of common string transformations I'm familiar with from working with AppleScript. I've got a few methods working but I'm stumbling over the following code. It would be easier if the NSScanner actually recorded whitespace characters but I don't see how to make that happen. So below is what I tried to do to compensate:
<pre>- (NSString *)stringByRemovingCharactersInSet:(NSCharacterSet *)removeSet {
BOOL scanned; // tracks if each looped scan gets anything
NSCharacterSet *whitespace = [NSCharacterSet whitespaceAndNewlineCharacterSet];
NSString *scannedString = [NSString string]; // to hold the resulting string
NSString *tmp, *whitespacePrefix, *remainingString = [NSString stringWithString:self]; // enumeration vars
NSRange whiteRange;
NSScanner *scanner = [NSScanner scannerWithString:self];
int scanIndex = 0;
while (!(scanIndex == [self length])) {
whiteRange = [remainingString rangeOfCharacterFromSet:whitespace options:NSLiteralSearch]; // check for whitespace prefix first
if (whiteRange.location == 0) { // and if exists store it in whitespacePrefix
whitespacePrefix = [remainingString stringWithPrefixCharactersInSet:whitespace];
scanIndex += [whitespacePrefix length]; // use the length of the whitespacePrefix to adjust scanner's scanLocation
scannedString = [scannedString stringByAppendingString:whitespacePrefix]; // and append whitespacePrefix to scannedString
[scanner setScanLocation:scanIndex];
scanned = [scanner scanUpToCharactersFromSet:removeSet intoString:&tmp];
if (scanned) {
scannedString = [scannedString stringByAppendingString:tmp];
scanIndex += [tmp length];
} else {
scanIndex++;
remainingString = [self substringWithRange:NSMakeRange(scanIndex, [self length] - scanIndex)]; // adjust remainingString
return scannedString;
- (NSString *)stringWithPrefixCharactersInSet:(NSCharacterSet *)prefixSet {
NSString *remainingString, *prefixString = [NSString string];
int s, e, i = 0;
NSRange prefixRange;
remainingString = [NSString stringWithString:self];
while (!(i == [self length])) {
prefixRange = [remainingString rangeOfCharacterFromSet:prefixSet options:NSLiteralSearch];
if (prefixRange.location == NSNotFound) {
break;
} else {
s = prefixRange.location;
e = prefixRange.length; // this should always be 1
if (s == 0) {
prefixString = [prefixString stringByAppendingString:[remainingString substringWithRange:NSMakeRange(s, e)]];
remainingString = [remainingString substringWithRange:NSMakeRange(s + e, [remainingString length] - e)];
} else break;
return prefixString;
}</pre>
Now, this obviously won't work in cases where you want to get rid of the whitespace but I could always make another method with a preserveWhitespace boolean argument, though I don't like this idea. Or I could check if whitespaceAndNewlineCharacterSet intersects with the removeSet and if so, avoid appending the whitespacePrefix to the scannedString but I have two problems with that: I don't want to bother with an NSMutableCharacterSet to get the intersection and, more importantly, I don't know how to check for an empty intersected character set, though I suspect if might be as easy as: if (!intersectedSet). And what if not all of the whitespaceAndNewline characters are in the removeSet, how would I determine which ones are in there? Okay, I guess that's three problems.
Is this kind of method more easily handled some other way? Don't bring up anything to do with regular expressions, though. I'm still not ready for that .
Also, for bonus points, I was thinking about a method that returns two values like NSFileManager's fileExistsAtPath:isDirectory: but I have no idea how to do that and I can't find any example code. I'm hoping to consolidate checking if the string has a prefix made of characters in a passed character set and if so the prefix string that would include any of those characters. Something like:
<pre>- (BOOL)hasPrefixWithCharactersInSet:(NSCharacterSet *)checkSet prefixString:(NSString **)resultString;</pre>
But how do I return two values in the method?
Also note: I have virtually no programming experience, so if I've made some terrible coding errors above, be gentle with me.
iMac G5 20"   Mac OS X (10.4.5)  

could you tell me how did you solve the problem?

Similar Messages

  • For Loop and Void Method Questions

    Question 1: How would I write a for loop that repeats the according to the number entered, to prompt the user to enter a number (double) between 1 and 100. If the number is outside this range it is not accepted.
    Question: 2 Also how would I write a for loop to do sum and find the average of the array numbers in a seperate void method( does not return anything to the main method)?
    Question: 3 (first code snippet) With my for loop that is used to process each number in the array and square it and cube it and display the results to 2 decimal places. How do I make it so say I want the array to allow me to enter 2 numbers (so I enter 2 numbers) then it asks me to enter a number between 1 -100 (which will prompt 2 times) that it shows me the results for the entered numbers between 1-100 after one another instead of number then result number then result like I how it now.
    for (int index = 0; index < howNum; index++) // process each number in the array
              enterYourNumbers = JOptionPane.showInputDialog   
                            ("Enter a number between 1 and 100");                       
              numArray = new double[howNum]; 
            try
                numArray[index] = Double.parseDouble(enterYourNumbers);
            catch (NumberFormatException e)
                    enterYourNumbers = JOptionPane.showInputDialog
                              ("Enter a number between 1 and 100");                          
                DecimalFormat fmt = new DecimalFormat ("###,###.00");
                JOptionPane.showMessageDialog(null, enterYourNumbers + " "  + "squared is "  + fmt.format(calcSquare(numArray[index]))
                                              + "\n" + enterYourNumbers + " " +  "cubed is " + fmt.format(calcCube(numArray[index])));                                                                           
                wantToContinue = JOptionPane.showInputDialog ("Do you want to continue(y/n)? ");
      while (wantToContinue.equalsIgnoreCase("y"));
    import javax.swing.*;
    import java.text.DecimalFormat;
    public class Array
        public static void main(String[] args)
            int howNum = 0;
            int whichNum = 0;     
            double[] numArray;
            boolean invalidInput = true;
            String howManyNumbers, enterYourNumbers, wantToContinue;
      do // repeat program while "y"
          do // repeat if invalid input
            howManyNumbers = JOptionPane.showInputDialog
                        ("How many numbers do you want to enter");                     
            try
                 howNum = Integer.parseInt(howManyNumbers);
                 invalidInput =  false;
            catch (NumberFormatException e )
                howManyNumbers = JOptionPane.showInputDialog
                            ("How many numbers do you want to enter");
          while (invalidInput);
          for (int index = 0; index < howNum; index++) // process each number in the array
              enterYourNumbers = JOptionPane.showInputDialog   
                            ("Enter a number between 1 and 100");                       
              numArray = new double[howNum]; 
            try
                numArray[index] = Double.parseDouble(enterYourNumbers);
            catch (NumberFormatException e)
                    enterYourNumbers = JOptionPane.showInputDialog
                              ("Enter a number between 1 and 100");                          
                DecimalFormat fmt = new DecimalFormat ("###,###.00");
                JOptionPane.showMessageDialog(null, enterYourNumbers + " "  + "squared is "  + fmt.format(calcSquare(numArray[index]))
                                              + "\n" + enterYourNumbers + " " +  "cubed is " + fmt.format(calcCube(numArray[index])));                                                                           
                wantToContinue = JOptionPane.showInputDialog ("Do you want to continue(y/n)? ");
      while (wantToContinue.equalsIgnoreCase("y"));
        public static double calcSquare(double yourNumberSquared)
            return yourNumberSquared * yourNumberSquared;       
        public static double calcCube(double yourNumberCubed)
           return yourNumberCubed * yourNumberCubed * yourNumberCubed;              
        public static void calcAverage(double yourNumberAverage)
    }

    DeafBox wrote:
    Question 1: How would I write a for loop that repeats the according to the number entered, to prompt the user to enter a number (double) between 1 and 100. If the number is outside this range it is not accepted. Use a while loop instead.
    Question: 2 Also how would I write a for loop to do sum and find the average of the array numbers in a seperate void method( does not return anything to the main method)? Why would you want to use 2 methods. Use the loop to sum the numbers. Then after the loop a single line of code calculates the average.
    Question: 3 (first code snippet) With my for loop that is used to process each number in the array and square it and cube it and display the results to 2 decimal places. How do I make it so say I want the array to allow me to enter 2 numbers (so I enter 2 numbers) then it asks me to enter a number between 1 -100 (which will prompt 2 times) that it shows me the results for the entered numbers between 1-100 after one another instead of number then result number then result like I how it now. If I understand you correctly, use 2 loops. One gathers user inputs and stores them in an array/List. The second loop iterates over the array/List and does calculations.

  • Java programming language main method question?

    Hello everyone I am quite new to the Java programming language and I have a question here concerning my main method. As you can see I am calling 4 others methods with my main method. What does the null mean after I call the method? I really don't understand is significance, what else could go there besides null?
    public static void main(String[] args)
              int cansPerPack = 6;
              System.out.println(cansPerPack);
              int cansPerCrate = 4* cansPerPack;
              System.out.println(cansPerCrate);
              have_fun(null);
              user_input(null);
              more_java(null);
              string_work(null);
         }Edited by: phantomswordsmen on Jul 25, 2010 4:29 PM

    phantomswordsmen wrote:
    ..As you can see I am calling 4 others methods with my main method. 'Your' main method? Your questions indicate that you did not write the code, who did?
    ..What does the null mean after I call the method?.. 'null' is being passed as an argument to the method, so there is no 'after the method' about it.
    ..I really don't understand is significance, what else could go there besides null? That would depend on the method signatures that are not shown in the code snippet posted. This is one of many reasons that I recommend people to post an SSCCE *(<- link).*
    BTW - method names like have_fun() do not follow the common nomenclature, and are not good code for a newbie to study. The code should be put to the pointy end of your sword.

  • Namespace, static method questions

    The really useful script here is
    Sephiroth's
    Actionscript 3 PHP Unserializer. I have used the old AS2
    version many times and it's totally rad. With it you can create
    really complex data objects in php,
    serialize() them, and then
    unserialize them with this code in Flash. It dramatically reduces
    the amount of code you have to write to share complex data between
    PHP and Flash.
    The problem I'm having is that the new Actionscript 3 version
    was apparently written for Flex. When I try to use it in flash, I
    get an error:
    1004: Namespace was not found or is not a compile-time
    constant.. This error refers to this line of code:
    use namespace mx_internal;
    I know next to nothing about namespaces in Flash, but best I
    can tell, that namespace constant is apparently to be found in
    mx.core.
    At any rate, if I remove all references to mx_internal
    namespace and mx.core, I can get the script working. This brings me
    to my first questions:
    QUESTION 1: What does the use of that namespace stuff
    accomplish?
    QUESTION 2: Am I likely to suffer any unpredictable consequences
    by removing that namespace stuff?
    Also, I get an error (1061: Call to a possibly undefined
    method serialize through a reference with static type
    org.sepy.io:Serializer.) when I try to call the static methods of
    the Serialize class by instantiating it and calling the methods via
    the instance like this:
    var oSerializer:Serializer = new Serializer();
    var str = oSerializer.serialize(obj);
    That's my third question:
    QUESTION 3: Is it impossible to call a static method of a class
    from an instance of the class? Do we have to reference the class
    name instead?
    Any help would be much appreciated

    nikkj wrote:
    static methods are really class messages, that is, methods that act upon an entire classification of objects not just one instance. it is an elegant means by which to send messages to all instances or rather the class itself
    Static method calls are determined at compile time,not at run time, so it is not possible for the invocation to be polymorphic.(i.e can't be overridden)
    Because the language is defined that way - via the JLS.
    There is no technological reason that precludes a language from doing it. Smalltalk does exactly that.

  • Classes and Methods question

    Hi
    I have a class called Users that i would like to use .... well to store users in the db, i would like to be able to call form the servlet:
    users.addUser(user); or users.deleteUser etc ...
    My question is:
    Do i need a new class eg. addUser that implements TransactionWorker for each method? Or can I do that directly from a method call?
    Regards
    ALex

    HI Alex,
    If you are storing a single record, normally you don't need to use a TransactionWorker, since auto-commit will be used implicitly.
    If you are storing multiple records per transaction, then the TransactionWorker will be at a higher level and will call multiple methods to add/modify/delete records.
    In any case, a TransactionWorker class per method is not normally the right approach.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Equity Method Questions!!

    I would like to generate an accurate u201Cprofit/loss on valuation of equity method applicable stocksu201D following equity increase/decrease of equity method company.
    Example
    Holding Entity, u201CHEu201D that would like to generate consolidated financial statements, has 40% stock of equity method company, u201CEq001u201D. The book value of the 40% stock is 200,000.
    When invested initially, the stock holderu2019s equity at u201CEq001u201D was 400,000 and the current yearu2019s net income is 15,500.
    Questions
    1.How should u201Cownershipu201D of equity method company configured?
         A.PCON=100%, POWN=40%, PMIN=60%
         B.PCON=40%, POWN=40%, PMIN=0%
    2.Is the balance sheet amount of equity method company to be uploaded (1) the closing balance or (2) the increase/decrease in the current year?
    3.Which process is a better choice between (1) setting u201CDestination Equity Accountu201D from consolidation business rules or (2) setting an extra business rule regarding equity method?
    Test Results
    After setting PCON 100% & 40% at ownership application, closing balance at 415,550, and current period net income of 15,500, the test results are as follows;
    [http://louis111.woweb.net/TestResult.xls]
    Thanks.
    Regards,
    Louis

    For automated equity method acounting (not proportional) it is necessary to correctly configure consolidation of investments (hint: execute COI check setting program to determine any inconsistencies).
    Once COI is configured it is necessary in the master data to assign the equity method to those cons unit where it is to be applied. These master data settings are time dependent and should be assigned accordingly.

  • Another asynchronous workflow method question

    Hi all.
    Your previous post on this topic was great people!!
    Right now I have a problem with an asynchronous method, on concrete words, is the method from object BUS2081, method EDIT.
    I've created a task based on that method and I have put some terminating events on that task but looking at the WF log on runtime, the task is only waiting for some of the events and ignoring just the ones i need. I don't know what the problem is because i have configured the events exactly on the same way....any idea of what is happening?
    I've solved this incidence including some parallel branches awaitiing for the events, so I'm "faking" in some way the "asynchronous" task, but this is a cheap trick...
    Thank you and best regards.
    Ismael

    Hi Ismael,
    I have a quick question regarding the BUS2081 - EDIT method.
    I'm using the Edit method with terminating events as POST, Delete, Park and Complete.
    Assume I have workflowed the invoice for GR missing scenario once its is done I will try and Post the Invoice document if it still has errors (say Price mismatch)then I want to Repark the document using the ' Save park document' icon.
    As there will be errors I can't do 'Save as Completed'. 
    Here I can't Repark the document until I Complete it.....:( I don't know how to handle this situtation.
    Any advice is helpful.
    Thank you,
    Renu.

  • Main method question in java, please help

    Guys I have looked all over the internet, and cannot understand any of these questions: I would really appreciate any help on them. The first, and most important thing I would like to know is, what is static: what is a static int, or a static main method? Why is this necessary, and what does it do? Could you please provide an example? Also, why is String[] args necessary within the parameters of the main method? Is this so that it can execute it? Last thing is: objects. Where can I learn about them? I know they are made with the new operator, but don't understand their use? Could you explain why they are useful? Can you give them values? and how do they relate to the dot operator? After these are answered, I will be so happy because I will feel like I actually know a little bit. Right now, I'm just confused... Thank you so, so much in advance!

    The first, and most important thing I would like to know is, what is static'static' means that the item concerned is associated with the class itself rather than an instance: so, it is accessible to all instances.
    Could you please provide an example?
    public static void main(String[] args)is an example, but you knew that. I don't really understand the question.
    Also, why is String[] args necessary within the parameters of the main method?'args' receives the arguments you type on the command line after the class name or jar name, depending on how you invoke the application.
    This is all covered in the documentation, which you should read before asking further questions.
    Last thing is: objects. Where can I learn about them?If you don't know about objects you're not going to learn about them by asking questions on a forum. It's far too large a topic. Get yourself a book.

  • Deployment Method Questions

    After going through the deployment section of the user guide to try and have a better understanding of how to deploy the appliance, I find myself needing some answers, if I were to deploy the device as a transparent proxy. I hope someone can oblige.
    1. The appliance can be deployed using WCCPv2 or a L4 switch, I understand that with WCCP traffic will be redirected to the appliance. Should this be all traffic or should it be http and/or https traffic only? The other method is to simply connect it to a L4 switch and the guide provides no explanation of how this works. How is this accomplished? Is it feasible to configure WCCP on the L4 switch and redirect traffic to the appliance as well?
    2. L4 traffic monitoring can be accomplished by using a span port, network tap or a hub. If I am to also enforce blocking and not just monitoring it says that the Web proxy and the L4 monitor must be on the same network. I don't understand, why is this so? Does the L4 traffic monitor port need an IP address?
    Thanks a lot and I hope someone can help.

    Each L4 switch will need it's own customized configuration, in order to redirect traffic. On a Cisco switch, you'd need to use policy based routing.
    It's an either / or situation. You would use either WCCP or L4 policy based routing, never together.
    If your switch supports WCCP, I'd highly recommend using it over policy based routing.
    the L4TM interfaces (T1/T2) are passive listening ports. They just see where your clients are accessing. In order to block this traffic, the L4TM will use the proxy interface (M1 or P1) in order to send a TCP RST packet to the offending client and server.
    If the P1 interface is not on the same network as the L4TM passive ports, the RST sent out P1 will never get to the client.
    Interesting. This isn't my understanding of the L4 Monitor. This is from the admin guide:
    L4 Traffic Monitor (L4TM) deployment is independent of the Web Proxy deployment. When
    connecting and deploying the L4 Traffic Monitor, consider the following:
    • Physical connection. You can choose how to connect the L4 Traffic Monitor to the
    network. For more information, see “Connecting the L4 Traffic Monitor” on page 27.
    • Network address translation (NAT). When configuring the L4 Traffic Monitor, connect it
    at a point in your network where it can see as much network traffic as possible before
    getting out of your egress firewall and onto the Internet. It is important that the L4 Traffic
    Monitor be ‘logically’ connected after the proxy ports and before any device that performs
    network address translation (NAT) on client IP addresses.
    • L4 Traffic Monitor action setting. The default setting for the L4 Traffic Monitor is monitor
    only. After setup, if you configure the L4 Traffic Monitor to monitor and block suspicious
    traffic, ensure that the L4 Traffic Monitor and the Web Proxy are configured on the same
    network so that all clients are accessible on routes that are configured for data traffic.
    It wouldn't make much sense in my mind to do the L4 without the proxy as you would have no way of gathering user info etc. Also, my understanding is that the L4 monitor is for malware - not category-based blocking.
    Last, I don't believe any of this requires policy based routing at all. The proxy uses WCCP or explicitly forwarded browsers. The L4 monitor uses a SPAN port or similar - generally sniffing traffic going to the firewall at the point of ingress.

  • Auto-re-action method Question (Please Urgent)

    Hi, all
    I have very quick question about Auto-re-action method CCMS, I setup method for "server dialog response time" and changed threshold value to become red and alert create, when I double click on it it shows 10 Alerts with status "Action_Faled" its suposed to be "Action Required" or Action-Running...
    Background job has been created, do you know how do i trace that why it does't work
    Even SMTP works fine, and internal mail works fine...
    Thanks a lot

    please let me know where should I post it
    i am working XI 3.0

  • The fillArc method (question about)

    Hi all,
    I'm studying basics of awt Graphics. Now i'm trying to use the fillArc method, but I found something that make me a question...
    So, I'm trying to draw a arc sucession, but I don't understand some parameters that are different of the rect delimiter. I used the drawArc method also to see the diferences.
    Here is part of the code (please see the comments in loop for):
    public class DesenhaArco extends JPanel{
    final Color VIOLETA = new Color(128, 0, 128);
    final Color AZULMARINHO = new Color(75, 0, 130);
    private Color colors[] = {Color.WHITE, Color.WHITE, VIOLETA, AZULMARINHO, Color.BLUE,
    Color.GREEN, Color.YELLOW, Color.ORANGE, Color.RED};
    public DesenhaArco(){
    setBackground(Color.WHITE);
    public void paintComponent(Graphics g){
    super.paintComponent(g);
    //obtain the width center
    int centerX = getWidth() / 2;
    int arcEspessure;
    //calculate the arcs espessure based in panel metrics
    if (getHeight() > getWidth()){
    arcEspessure = getWidth() / (colors.length * 2);
    else {
    arcEspessure = getHeight() / colors.length;
    if (arcEspessure * colors.length * 2 > getWidth()){
    arcEspessure = getWidth() / (colors.length * 2);
    for (int contArco = colors.length; contArco > 0; contArco--){
    g.setColor(Color.BLACK);
    //draw a rect delimiter with black borders to test
    g.drawRect(centerX - arcEspessure * contArco, getHeight() - arcEspessure * contArco,
    arcEspessure * contArco * 2, arcEspessure * contArco);
    g.setColor(colors[contArco - 1]);
    //here is the problem (above, in fillArc)
    //the x, y, width and height parameters is equals the parameters of drawRect method,
    //but results in arcs with only part of the height inserted in height argument
    //if I multiplicate the height argument (4th parameter) for 2
    //(arcEspessure * contArco * 2) I obtain the correct results
    //but I think this is'nt a correct mode...
    g.fillArc(centerX - arcEspessure * contArco, getHeight() - arcEspessure * contArco,
    arcEspessure * contArco * 2, arcEspessure * contArco, 0, 180);
    }Sorry for my wrong english.
    Thanks. :-)

    "The center of the arc is the center of the rectangle whose origin is (x, y) and whose size is specified by the width and height arguments." (JSE 6 API Specification)
    I think I have understanded... The Y start point of an arc begins in center of height metric.
    So I changed the arguments of fillArc method, specificatly the 2th and 4th parameters, making an rectangle delimiter with double of the metrics that I need and starting out of the panel delimiters (1/2 out panel):
    g.fillArc(centerX - espessuraArco * contArco, -contArco * espessuraArco,
    espessuraArco * contArco * 2, espessuraArco * contArco * 2, 0, -180);Thanks for all. :-)

  • Abstract method question

    Even though the method add in AbstractTest does not throw AnotherException, it compiles fine. Why is it ?
    public class AbstractTest extends MyAbstract{
    public void add()throws MyException {
    class MyException extends Exception {
    class AnotherException extends Exception {
    abstract class MyAbstract {
    abstract public void add() throws MyException, AnotherException;
    }

    JoachimSauer wrote:
    When posting code, please use the code-tags (select your code and press "CODE" just above the text field). It is much easier to read this way.
    A method overriding another method is perfectly free to reduce the checked exceptions that it can throw. That's because "throws Foo" only means "I could theoretically throw Foo". It doesn't guarantee that it ever actually throws Foo.
    It must not add new ones, however.I like to look at it this way: "throws X" does not mean "I promise to throw X." On the contrary, it means, "I promise +not+ to throw anything +other than+ X (or its subclasses)." So when I child class "narrows" that throws clause it just means that it promises not to throws anything outside of an even smaller subset.

  • BDB 4.6 D Dbt::get_dlen Method Question/Problem

    I'm using a cursor to iterate through a BDB 4.6 file using:
    System::Data::DataTable^ dt;
    mydbfile.cursor(NULL, &cursorp, 0);          
    while ( cursorp->get(&key, &data, DB_NEXT) == 0 )
    u_int32_t key_len = key.get_dllen(); // always get 0
    u_int32_t data_len = data.get_dlen(); // always get 0 even though (char*)data.get_data() returns valid ptr to char string
    String^ key_str = gcnew String((char*)key.get_data());
    String^ data_str = gcnew String((char*)data.get_data());
    dt->Rows->Add(key_str,data_str);
    As the code comments show above, the get_dllen() method always returns zero
    even though a valid ptr is returned to null terminated key and data strings.
    Thus I'm not sure that I'm reading all the data that is present.
    What am I doing wrong?
    Thanks,
    Tom Fisher

    Hello,
    Is the get_size() method what you want to use to return the data array size? get_dlen() returns the length of the partial record read or written by the application and may not be what you want. The documentation on the Dbt handle is at:
    http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/CXX/dbt.html
    Thanks,
    Sandra

  • Cisco ISE multiple EAP authentication methods question

    With Cisco ISE can you have various clients each using different EAP methods, such as PEAP for Windows machines, MD5 for legacy and TLS for others?
    My current efforts seem to fail as if a device gets a request from the ISE for an EAP method it doesnt understand it just times out.
    Thanks in advance.

    Multiple EAP Methods work fine. If your Clients are being crap you could try forcing then to use a specific set of Allowed Authentication Method by creating more specific Authentication rules.
    Sent from Cisco Technical Support iPad App

  • Document ID Reset all method question

    Hi,
    Just have a question about the "reset all Document ID's" under the Document ID section in site settings.
    We've got duplicated Document ID's and after testing i've noticed that ticking this and starting the Document ID service it fixes the issue. I was wondering if anyone know anything about how it works and what it does in the background?
    Any links to articles would be great as I cannot find anything worth while.
    If this is helpful please mark it so. Also if this solved your problem mark as answer.

    Hi TenPart,
    Is this (Reset) done on everytime a document is uploaded anyway?
    No. Document ID’s are automatically assigned to uploaded documents.
    Select the Reset all Document IDs… check box if you want to automatically add the prefix to all existing Document IDs in your site collection.
    More information, please refer to the link:
    https://support.office.com/en-in/article/Activate-and-configure-Document-IDs-in-a-site-collection-66345c77-f079-4104-ac7a-e25826849306?ui=en-US&rs=en-IN&ad=IN
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

Maybe you are looking for

  • Whenever I connect my iPhone to iTunes, it comes up with an error message

    Okay so my brother received his new iPhone 5s a couple of weeks back and we share an iTunes account so I connected his iPhone to my macbook because his laptop has broken USB ports. Everything was fine and all, but I went to connect my phone to my Mac

  • Delta Load on DSO and Infocube

    Hi All,         I would like to know the procedure for the scenario mentioned below. Example Scenario: I have created a DSO with 10 characteristics and 3 keyfigure. i have got 10 Customers whose transactions are happening everyday. A full upload on t

  • Click link and download file

    Hi , I am creating xml file from query and then read xml file as pdf using cf document. So I have my list in the website as xml file and pdfs So if click on xml it should ask me for download/save as and same thing for pdf. How can I do that. I know c

  • ACE HTTP probe get - not able to contain '?' in URL?

    Trying to put a probe together.. probe http probeElvis interval 5 passdetect interval 10 request method get url 8888/livelink/llisapi.dll?func=LL.getlogin&NextURL=%2Flivelink%2Fllisapi%2Edll%3FRedirect%3D1 expect status 100 404 connection term forced

  • Path to download jsptl.jar please

    hi, please give me the path from where i can download jsptl.jar . thanks.