Take and delete a string in another string

I have an original input string = 111100001111

I need to take for example the least 4 bits... Output = 1111

and to remove from the input string original for effect the original input string = 11110000

I'm doing a generic, but the fact is that I can't remove subset I of the original input string.

How can I take and delete from a string at the same time?

Something like that?

Tags: NI Software

Similar Questions

  • string find and delete line

    I have search and delete something like this:

    name: myvmname

    device: Reader

    Location: NomCluster

    type: windows2003

    name: myvmname2

    device: Reader

    Location: NomCluster

    type: windows2003

    ..

    ...

    etc...

    ...

    I know that I probably have something like:

    Get-Content myfile.txt | foreach-object {$_ - replace "device drive", ("")}

    So my question is:

    (1) is there a better way to remove the line "device: Reader.

    (2) after the deletion of will there and empty space between "name and location ', if so is there a way to push the high place and all that?

    (3) when I run the command I posted above, it does not change the file "myfile.txt, but statement instead of the screen has changed." How to change the file also with changes reported to the screen?

    name: myvmname2

    < - empty line - yuk!

    Location: NomCluster

    type: windows2003

    more like what I want:

    name: myvmname2

    Location: NomCluster

    type: windows2003

    The following PowerShell script will remove the "device:" lines from a file named MyFile.txt:

    Get-Content - Path myfile.txt |

    Where-Object {$_-notlike "device: *"} |

    Set-Content - Path mynewfile.txt

    Remove-Item - Path MyFile.txt

    Rename-Item - Path mynewfile.txt - NewName MyFile.txt

  • If I take my iphone jailbroken 5s and icloud lock'd get another?

    If I take my iphone jailbroken 5s and icloud lock'd get another?

    Jailbreaking annuls all guarantees and loses all rights to maintenance and assistance.

  • I have different bookmarks I want to keep on each computer, synchronization will delete the bookmarks on a single computer and replace the bookmarks from another computer in their place

    I have not yet used sync, but I sense it's going to be a problem if I do. I have different bookmarks I want to keep it on each computer. Sync will delete the bookmarks on a single computer and replace the bookmarks from another computer in their place? So I think that will erase the bookmarks on the second computer you configured to synchronize. Is there a way to merge bookmarks on every computer in the library of a bookmark that contains all bookmarks on both computers, so I'm not all bookmarks in sync?

    Just to be clear, this is something that we have commented several times in the forum, Firefox Sync adds everything that is already in the device for the account and pushes this info for the rest of the devices.

    So if you have 2 computers with data X and the other with the data from there, once you set up synchronization in both computers you will have X + Y at the same time.

    I hope that clarifies the doubts...

  • Search and replace the string formatting

    Hello

    I try to do a search and replace the formatting of a string.

    In the example, I'm looking for the string 'SUCCESSFUL', but it must also begin by usbflash and some number + PASSED.

    I can't get the format to have a number between 1 and 99. The number of replacements should add up to 6 in this case. I tried with \d for any number, and I also tried [1-99].

    Make a right-click on the function search and replace the string.  There is an option to use regular Expressions.  Then give it a try.

    EDIT: You need to set the entry replace all to TRUE.

  • Partition question - what would be the best way to increase its space and take part of the space from another partition

    Hello, I have my 500 GB SATA broken down into 3 partitions. Vista and 2 others. The problem is the process of using Partition Magic, Vista has been given only 30 GB, now its operation with 1-2 GB of free space. I want to know what would be the best way to increase its space and take part of the space from another partition, but I don't want to have to reinstall or do I want to lose all the data like photos, browser, documents and news ect.

    -Thank you

     

    You can read more details on "How to move from one partition to the other sapce without loss of data.

  • 2D and System.arrayCopy string tables

    Hello

    I have an array of strings 2D and I wrote the following program to copy and it works without problems:
    public static void main(String[] args) {
    
            String[][] P, C;
    
            P = new String[2][3];
            C = new String[2][3];
    
            P[0][0] = "hello1";
            P[0][1] = "hello2";
            P[0][2] = "hello3";
            P[1][0] = "hello4";
            P[1][1] = "hello5";
            P[1][2] = "hello6";
    
            System.arraycopy(P, 0, C, 0, 2);
    
                   int i, j;
            for (i = 0; i < C.length; i++) {
                for (j = 0; j < C.length; j++) {
    System.out.println(C[i][j]);
    }

    }
    }
    My questions:
    
    1. In case of 2D arrays, is the last argument (length) the number of rows in a 2D array?
    
    2. Why some examples online use arraycopy to copy one row at a time ........ doesn't this method work directly for 2D arrays?
    
    
    Thank you
    Roberta
    
    Edited by: user13608260 on Jan 3, 2011 8:26 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    Note that there is really no such thing as an array in Java 2D is. The array pointed to by the reference variable P is simply a table that has 2 components and component type String().

    String[] x = new String[2]; // x points to an array of 2 elements, with a  component type String
    String[][] y = new String[2][50]; // y points to an array of 2 elements, with a component type of String[]
    

    arraycopy always behaves the same, regardless of the type of the array of dimensions how we consider there. So, after your arraycopy, P [0] and C [0] both point to the same String [], and if you do P [0] = something, that will be reflected in C as well.

  • Problem with search and deletion functions

    I use Vista Ultimate and in recent weeks, I have problems using the search and delete functions. Whenever I'm trying to look for something in the search window does not allow me to do and goes in a hand. Whenever I delete something, a small window pops up saying deletion... .and this continues forever.

    Hello

    What antivirus/antispyware/security products do you have on machine? Be one
    you have ALWAYS had on this machine, including those you have uninstalled (they leave leftovers
    can cause strange problems).

    ----------------------------------------------------

    Follow these steps:

    Start - type this in the search box-> find COMMAND at the top and RIGHT CLICK – RUN AS ADMIN

    Enter this at the command prompt - sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
    generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    Also run CheckDisk, so we cannot exclude as much as possible of the corruption.
    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

    ==========================================

    After the foregoing:

    How to troubleshoot a problem by performing a clean boot in Windows Vista
    http://support.Microsoft.com/kb/929135
    How to troubleshoot performance issues in Windows Vista
    http://support.Microsoft.com/kb/950685

    Optimize the performance of Microsoft Windows Vista
    http://support.Microsoft.com/kb/959062
    To see everything that is in charge of startup - wait a few minutes with nothing to do - then right-click
    Taskbar - the Task Manager process - take a look at stored by - Services - this is a quick way
    reference (if you have a small box at the bottom left - show for all users, then check that).

    How to check and change Vista startup programs
    http://www.Vistax64.com/tutorials/79612-startup-programs-enable-disable.html

    A quick check to see that load method 2 is - using MSCONFIG then put a list of
    those here.
    --------------------------------------------------------------------

    Tools that should help you:

    Process Explorer - free - find out which files, key of registry and other objects processes have opened.
    What DLLs they have loaded and more. This exceptionally effective utility will show you even who has
    each process.
    http://TechNet.Microsoft.com/en-us/Sysinternals/bb896653.aspx

    Autoruns - free - see what programs are configured to start automatically when you start your system
    and you log in. Autoruns also shows you the full list of registry and file locations where applications can
    Configure auto-start settings.
    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx
    Process Monitor - Free - monitor the system files, registry, process, thread and DLL real-time activity.
    http://TechNet.Microsoft.com/en-us/Sysinternals/bb896645.aspx

    There are many excellent free tools from Sysinternals
    http://TechNet.Microsoft.com/en-us/Sysinternals/default.aspx

    -Free - WhatsInStartUP this utility displays the list of all applications that are loaded automatically
    When Windows starts. For each request, the following information is displayed: Type of startup (registry/Startup folder), Command - Line String, the product name, Version of the file, the name of the company;
    Location in the registry or the file system and more. It allows you to easily disable or remove unwanted
    a program that runs in your Windows startup.
    http://www.NirSoft.NET/utils/what_run_in_startup.html

    There are many excellent free tools to NirSoft
    http://www.NirSoft.NET/utils/index.html

    Window Watcher - free - do you know what is running on your computer? Maybe not. The window
    Watcher says it all, reporting of any window created by running programs, if the window
    is visible or not.
    http://www.KarenWare.com/PowerTools/ptwinwatch.asp

    Many excellent free tools and an excellent newsletter at Karenware
    http://www.KarenWare.com/

    ===========================================

    Vista and Windows 7 updated drivers love then here's how update the most important.

    This is my generic how updates of appropriate driver:

    This utility, it is easy see which versions are loaded:

    -Free - DriverView utility displays the list of all device drivers currently loaded on your system.
    For each driver in the list, additional useful information is displayed: load address of the driver,
    Description, version, product name, company that created the driver and more.
    http://www.NirSoft.NET/utils/DriverView.html

    For drivers, visit manufacturer of emergency system and of the manufacturer of the device that are the most common.
    Control Panel - device - Graphics Manager - note the brand and complete model
    your video card - double - tab of the driver - write version information. Now, click on update
    Driver (this can do nothing as MS is far behind the certification of drivers) - then right-click.
    Uninstall - REBOOT it will refresh the driver stack.

    Repeat this for network - card (NIC), Wifi network, sound, mouse, and keyboard if 3rd party
    with their own software and drivers and all other main drivers that you have.

    Now in the system manufacturer (Dell, HP, Toshiba as examples) site (in a restaurant), peripheral
    Site of the manufacturer (Realtek, Intel, Nvidia, ATI, for example) and get their latest versions. (Look for
    BIOS, Chipset and software updates on the site of the manufacturer of the system here.)

    Download - SAVE - go to where you put them - right click - RUN AD ADMIN - REBOOT after
    each installation.

    Always check in the Device Manager - drivers tab to be sure the version you actually install
    presents itself. This is because some restore drivers before the most recent is installed (sound card drivers
    in particular that) so to install a driver - reboot - check that it is installed and repeat as
    necessary.

    Repeat to the manufacturers - BTW in the DO NOT RUN THEIR SCANNER device - check
    manually by model.

    Look at the sites of the manufacturer for drivers - and the manufacturer of the device manually.
    http://pcsupport.about.com/od/driverssupport/HT/driverdlmfgr.htm

    How to install a device driver in Vista Device Manager
    http://www.Vistax64.com/tutorials/193584-Device-Manager-install-driver.html

    If you update the drivers manually, then it's a good idea to disable the facilities of driver under Windows
    Updates, that leaves about Windows updates but it will not install the drivers that will be generally
    older and cause problems. If updates offers a new driver and then HIDE it (right click on it), then
    get new manually if you wish.

    How to disable automatic driver Installation in Windows Vista - drivers
    http://www.AddictiveTips.com/Windows-Tips/how-to-disable-automatic-driver-installation-in-Windows-Vista/
    http://TechNet.Microsoft.com/en-us/library/cc730606 (WS.10) .aspx

    Hope these helps.

    Rob - bicycle - Mark Twain said it is good.

  • &amp; lt;mx:RemoteObject.../ &amp; gt; and deleting a record

    I use a RemoteObject to a CFC call that works pretty well right now. I am able to add, edit and delete records. An improvement I have to do, is if I try to remove a record that I should not be able to delete because of relational integrity issues, I.e. remove a record that is linked to another record in another table, I need to display a message to the user them teling registration can not be deleted.

    If I try to delete a record in the database will not let me delete I get a generic error message will freak out at my end users. Because of this I put the code in the CFC that prevents the CFC to try to delete a record, it should not. Problem is if the user attempts to delete a folder which cannot be deleted how can I return something (a window), back of my CFC telling them that impossible to delete the record at the moment?

    Right now the code which calls the RemoteObject looks like this (he uses a custom event to pass in variables).

    private void secTypeAddedHandler(event:SecTypeAddEvent):void / / it's the listener for the event of type dry new Add.
    {
    getAllSecStuff.addSecRole (event.secTypeToAdd); Pass the event with the addSecRole method of CFC variables.
    getAllSecStuff.getSecRoles (); Refresh data
    }

    <!--appeal WebService-->
    < mx:RemoteObject id = "getAllSecStuff" destination = "ColdFusion" source = "ISIF. WebServices.Flex.SecRoles"showBusyCursor ="true">
    < name mx:method = "getSecRoles" result = "getSecRolesHandler (event)" / >
    < / mx:RemoteObject >


    My CFC looks a bit like this:
    < name cffunction = "addSecRole" = "remote access" returntype = "string" >
    < name cfargument = "sectype" type = "struct" required = "yes" >
    < CFSET MyReturnString = "" > "".
    < CFIF STUFFTO Add... >
    < CFQUERY... to add data >
    < CFELSE MOD STUFF >
    < CFQUERY... change data >
    < CFELSE >
    < CFIF to know if I can remove it or not >
    < CFQUERY DEL DATA >
    < CFELSE >
    < CFSET MyReturnString = "No can do" > ".
    < / CFIF >
    < / CFIF >

    < cfreturn MyReturnString >
    < / cffunction >

    I guess my big question is I know that the CFC returns a string variable. How can I tell Flex to look at this value? If the returned string is set to "No can do" then I want to display a popup window indicating to the user that they cannot delete this record because it is associated with another record. If the returned string is set on "" I don't want to do anything.

    Thanks in advance for the help!

    Have an ordinary day...
    KomputerMan ~ |  :-)


    In fact I'm getting return a string in add it / mod / delete function. The only reason why I do the getSecRolesHandler
    call is to refresh my datagrid to show what changes have been made.

    I guess what I'm looking for, it's how to see what is returned by the getAllSecStuff.addSecRole (event.secTypeToAdd); call. Does show that I'm pretty new to Actionscript 3?

    So after a bit more digging, I found that I had to add a result call my RemoteObject call. So now my code looks like this:

    Then I created a function as follows, and life was good!
    [Bindable]
    private var MyUpDateResults:String = new String();

    private void getSecRoleEventStatus(event:ResultEvent):void
    {
    MyUpDateResults = event.result as String
    If (MyUpDateResults is "ClassTmp")
    {
    Alert.Show ("cannot remove the security role because it is associated with a model CF.", "can't delete the folder '");
    }
    }

    Thanks for the help, you put me on the path to enlightenment!

    Have an ordinary day...
    KomputerMan ~ |  :-)

  • How to get the old default profile and delete the new default profile?

    Due to the power cut, I was not able to shut down my PC (windows 7). When I started it again once I started it in safe mode as i had dialogue"Windows has not stopped correctly chosen what mode to boot your PC... »

    I chose safe mode and then restarted the PC normally. But when I started FF, he behaved as if it were the first time installed and all my settings were gone.

    Open the Profile Manager and he showed only 1 default profile where, as I have 2 (default and another profile). This new default profile is completely new.

    I found my profile folder. It contains 3 profiles. My previous default and the other that I had created. And the third profile is new default. How do you take the 2 earlier

    Hello! You can copy your old information in your profile again (and since you had two old profiles to be restored, you can also create a new another profile for the second). It's all about copy - paste between folders, more information here: recovery of data from an old profile.

    Information on how to create a new profile here: use the Profile Manager to create and delete profiles Firefox.

  • Help with excel import and delete the page script

    Hello. I will try to make it as simple as possible. I have some data from excel (saved as delimited by tabs) that I need to import in a 5 PDF page. I use the script below to import, and it works fine. All import fields and records the individual (one for each record) PDF. However, I need to extend this functionality by removing some pages before it saves the document by looking at the different boxes. The code below is what I use to import the records.

    // specify the filename of the data file
    var fileName = "/Users/MacMike/Desktop/Test.txt";  // the tab delimited text file containing the data
    var outputDir = "/Users/MacMike/Desktop/Dump/";    // make sure this ends with a '/'
    
    var err = 0;
    var idx = 0;
    while (err == 0) {
        err = this.importTextData(fileName, idx);    // imports the next record
    
        if (err == -1)
            app.alert("Error: Cannot Open File");
        else if (err == -2) 
            app.alert("Error: Cannot Load Data");
        else if (err == 1)
            app.alert("Warning: Missing Data");
        else if (err == 2)
            app.alert("Warning: User Cancelled Row Select");
        else if (err == 3)
            app.alert("Warning: User Cancelled File Select");
        else if (err == 0) {
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf"); // saves the file
            idx++;
        }
    }
    

    As I said before you import works surprisingly well.

    My PDF consists of 5 pages (info-registration, p1 = Dir-contract = p0, p2 = contract ndarp-brand, p3 = takes-contract, p4 = agreement must be brand). My idea is that on the import of data, the script will look at a few check boxes and determine which contracts to remove on the PDF and then save. I wrote the syntax of which, in my view, what it should look like. I'm not a programmer and know just a little bit. I looked through the documentation and this is what I came with. I don't know how to combine to work. Here's the code I came up with that.

    var dir = this.getField("Associate Director"); // checkbox
    var aldir = this.getField("Alumni Director"); // checkbox
    
    var fac = this.getField("Facilitator"); // checkbox
    var alfac = this.getField("Alumni Facilitator"); // checkbox
    
    var oyb = this.getField("Optimize Your Brain"); //checkbox
    var poyb = this.getField("DVD and Workbook Previously Purchased"); // checkbox
    
    // Below are all the possible training options.
    if (dir.value=="Checked" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="") {
        this.deletePages({nStart:3, nEnd:4})
    }
    else if (dir.value=="" || aldir.value=="Checked" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="") {
        this.deletePages({nStart:3, nEnd:4})
    }
    
    else if (dir.value=="" || aldir.value=="" || fac.value=="Checked" || alfac.value=="" || oyb.value=="" || poyb.value=="") {
        this.deletePages({nStart:2, nEnd:4})
    }
    else if (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="Checked" || oyb.value=="" || poyb.value=="") {
        this.deletePages({nStart:2, nEnd:4})
    }
    
    else if (dir.value=="" || aldir.value=="" || fac.value=="Checked" || alfac.value=="" || oyb.value=="Checked" || poyb.value=="") {
        this.deletePages({nStart:2, nEnd:2})
    }
    else if (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="Checked" || oyb.value=="Checked" || poyb.value=="") {
        this.deletePages({nStart:2, nEnd:2})
    }
    else if (dir.value=="" || aldir.value=="" || fac.value=="Checked" || alfac.value=="" || oyb.value=="" || poyb.value=="Checked") {
        this.deletePages({nStart:2, nEnd:2})
    }
    else if (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="Checked" || oyb.value=="" || poyb.value=="Checked") {
        this.deletePages({nStart:2, nEnd:2})
    }
    
    else if (dir.value=="Checked" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="Checked" || poyb.value=="") {
        this.deletePages(none) // I realize this is incorrect. Just showing that this option results in no deleted pages.
    }
    else if (dir.value=="" || aldir.value=="Checked" || fac.value=="" || alfac.value=="" || oyb.value=="Checked" || poyb.value=="") {
        this.deletePages(none) // I realize this is incorrect. Just showing that this option results in no deleted pages.
    }
    else if (dir.value=="Checked" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="Checked") {
        this.deletePages(none) // I realize this is incorrect. Just showing that this option results in no deleted pages.
    }
    else if (dir.value=="" || aldir.value=="Checked" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="Checked") {
        this.deletePages(none) // I realize this is incorrect. Just showing that this option results in no deleted pages.
    }
    
    else if (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="Checked" || poyb.value=="") {
        this.deletePages({nStart:1, nEnd:2})
    }
    else (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="Checked") {
        this.deletePages({nStart:1, nEnd:2})
    }
    

    How to combine these two so that I can create a document temp import my data, check the boxes to check off and delete the appropriate pages and save the file and then go to the next record? I got the first part done. It imports large and has the right, but I don't know what to do next. Thanks for any help!

    Or y at - it another way to do this?


    Michael

    Wow. Ok. I had it works beautifully. There was a lot of trial and error. Because the script as it was would have, would open the original PDF, delete the pages needed, then save the file. While it would be to go to the next record is missing pages in PDF and bomb to open. I hunted and searched for a way to do this. I found "this.insertPages" in the documentation. Finally, what worked was so move the "save under" in the service and put it under every variation of check. So now when checking the boxes, he performs the check, removes the mandatory pages, stops, insertions of back in deleted pages from the original file, leave the service and finally goes to the next record.

    Here is my final script:

    // This code looks at an excel (tab delimited) file, imports the records into a PDF form 10 Pages long.
    // Then checks a series of checkboxes and deletes the pages that aren't associated with first page.
    // After it deletes these pages it reinserts the deleted pages so it can do the checks for the next record in the (tab delimited) file.
    
    // variables for importing excel data
    var err = 0;
    var idx = 0;
    var fileName = "/Users/MacMike/Desktop/Test.txt";  // the tab delimited text
    var outputDir = "/Users/MacMike/Desktop/Dump/";    // make sure this ends with a '/'
    
    //Checking a bank of 6 checkboxes and determine which pages need to be deleted, save the file, and the insearch the deleted pages again.
    function seekandDestroy() {
        if (dir.value=="Checked" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Off") {
            this.deletePages({nStart:6, nEnd:9})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:5, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:6, nEnd:9 });
        }
        else if (dir.value=="Off" && aldir.value=="Checked" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Off") {
            this.deletePages({nStart:6, nEnd:9})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:5, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:6, nEnd:9 });
        }
    
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Checked" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Off") {
            this.deletePages({nStart:3, nEnd:9})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:9 });
        }
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Checked" && oyb.value=="Off" && poyb.value=="Off") {
            this.deletePages({nStart:3, nEnd:9})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:9 });
        }
    
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Checked" && alfac.value=="Off" && oyb.value=="Checked" && poyb.value=="Off") {
            this.deletePages({nStart:3, nEnd:5})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:5 });
        }
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Checked" && oyb.value=="Checked" && poyb.value=="Off") {
            this.deletePages({nStart:3, nEnd:5})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:5 });
        }
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Checked" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Checked") {
            this.deletePages({nStart:3, nEnd:5})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:5 });
        }
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Checked" && oyb.value=="Off" && poyb.value=="Checked") {
            this.deletePages({nStart:3, nEnd:5})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:5 });
        }
    
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Checked" && poyb.value=="Off") {
            this.deletePages({nStart:1, nEnd:5})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:0, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:1, nEnd:5 });
        }
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Checked") {
            this.deletePages({nStart:1, nEnd:5})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:0, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:1, nEnd:5 });
        }
        else if (dir.value=="Checked" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Checked" && poyb.value=="Off") {
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
        }
        else if (dir.value=="Checked" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Checked") {
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
        }
        else if (dir.value=="Off" && aldir.value=="Checked" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Checked" && poyb.value=="Off") {
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
        }
        else if (dir.value=="Off" && aldir.value=="Checked" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Checked") {
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
        }
    }
    
    // Imports records does the above function then go the next record, all the while doing error reporting.
    while (err == 0) {
        err = this.importTextData(fileName, idx);    // imports the next record
    
        if (err == -1)
            app.alert("Error: Cannot Open File");
        else if (err == -2)
            app.alert("Error: Cannot Load Data");
        else if (err == 1)
            app.alert("Warning: Missing Data");
        else if (err == 2)
            app.alert("Warning: User Cancelled Row Select");
        else if (err == 3)
            app.alert("Warning: User Cancelled File Select");
        else if (err == 0) {
            var dir = this.getField("Associate Director"); // checkbox
            var aldir = this.getField("Alumni Associate Director"); // checkbox
            var fac = this.getField("Facilitator"); // checkbox
            var alfac = this.getField("Alumni Facilitator"); // checkbox
            var oyb = this.getField("Optimize Your Brain Site Coordinator"); //checkbox
            var poyb = this.getField("DVD and Workbook Previously Purchased"); // checkbox
            seekandDestroy(dir, aldir, fac, alfac, oyb, poyb); //performs the above function
            idx++; //goes to next record
        }
    }
    
  • Problem with creating, truncating and deleting a database in 1 transaction

    Hello

    I came across a problem when it is in the same transaction creating a data base, truncating it and then delete it. Do these 3 things causes the following transaction validation to last forever.
    The following code causes the problem:

    File envHome = new File ("truncate-delete-test");
    envHome.mkdirs ();
    EnvironmentConfig envConfig = EnvironmentConfig.DEFAULT;
    envConfig.setAllowCreate (true);
    envConfig.setTransactional (true);
    envConfig.setTxnSerializableIsolation (true);
    Environment = environment (this.envHome, envConfig);

    Transaction txn = this.environment.beginTransaction (null, TransactionConfig.DEFAULT);

    DbConfig DatabaseConfig = new DatabaseConfig();
    dbConfig.setAllowCreate (true);
    dbConfig.setTransactional (true);
    String dbName = "test-db";
    Database db = this.environment.openDatabase (txn, dbName, dbConfig);

    CBI Close();
    environment.truncateDatabase (txn, dbName, false);
    DB = this.environment.openDatabase (txn, dbName, dbConfig);

    CBI Close();
    this.environment.removeDatabase (txn, dbName);

    TXN.Commit (); <-this statement would never return.

    I encountered this problem with version 4.0.92. I've updated to 4.1.7 but the problem still exists.
    Also, it manifests when the records are written to the database before and after it truncate.

    Looking in the process with the debugger shows the following stack trace during the commit endless happens:

    [...]
    DbTree.deleteMapLN (DatabaseId) line: 1069
    DatabaseImpl.finishDeleteProcessing (line): 1164
    Txn.cleanupDatabaseImpls (boolean) line: 1404
    TXN.Commit (durability) line: 728
    TXN.Commit (line): 549
    Transaction.Commit (line): 227
    [...]

    Depending on where I stop the process, there are additional calls on top of the stack.

    Exit Registration unfortunately does not help here, as the log messages stopped once the problem started to appear.

    Is it somehow not allowed to create, truncate and delete a database in the same transaction? I couldn't find anything in this sense in the documentation, and it is no exception either.
    Or have I came across a bug in I here?

    Thanks in advance for any advice or solutions.

    Christoph
  • E4X: Select the nodes that match a criterion, and whose children match to another

    Hi guys,.

    I'm writing a query of E4X to select the nodes that match a criterion, and whose children match to another. My actual dataset is a little more complex than this example, but this one is easy to follow.

    Say that you are modeling a hierarchy of nodes, where each node can have zero or more parents and children. The XML file is a simple index of nodes, and each node contains their immediate parent and child relationships. In this way, you can start with a given node and build a tree in a direction any to any depth. As an extra flavor and selection criteria, each node has one or more colors that are associated with.

    Here's a sample:

    nodes <>

    < node id = ' a' >

    < name color = "red" / >

    < child id = 'b' / >

    < / node >

    < node id = "b" >

    < name color = "red" / >

    < name of color = "green" / >

    < parent = 'a' / >

    < child id = "d" / >

    < / node >

    < = 'c' node id >

    < name color = "blue" / >

    < name of color = "green" / >

    < child id = "d" / >

    < / node >

    < node id = "d" >

    < name of color = "green" / >

    < id parent = 'b' / >

    < id parent = 'c' / >

    < / node >

    ...

    < / node >

    Now, say I want to select all nodes root (those who have no parent relationships) that are red. This is the best I could come up with:

    var nodeChildren:XMLList = nodeData.node. (! hasOwnProperty ('parent'))... Color. (@name == "red");
    for each {(var childData:XML in nodeChildren)
    var childID:String = nodeData.parent () .@id;

    }

    }

    The first line gets us 90% of the way by selecting all of the nodes of color matching, but we have all these entries to get the id of the node that contains.

    It is possible to select the nodes in one of the E4X without needing the loop?

    Thank you!

    Scott

    So how about this?

    nodeData.node. (! hasOwnProperty ('parent') & color.) (@name=="red").length () > 0)

  • my computer updated and delete all my files, how to bring them back?

    original title: help! my computer updated and delete all my files, how to bring them back?

    Help!  My computer did an automatic update and deleted all my files and I can't find one of my old files, how to bring them back?

    You get an error message on a Temp profile?

    Try this:

    Restore point:

    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-system-restore/

    Do Safe Mode system restore, if it is impossible to do in Normal Mode.

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    http://www.windowsvistauserguide.com/system_restore.htm

    Read the above for a very good graph shows how backward more than 5 days in the System Restore Points by checking the correct box.

    See you soon.

    Mick Murphy - Microsoft partner

  • problem with the htm file firsefox document, becomes it removed and deleted

    I have a white screen which displays the file as 'file:///C:/Users/Mark/AppData/Local/Temp/Magentic/Mag3075.htm', is unable to get rid of it, can someone give me a simple step by step direction to remove it and get out of my computer, the magnetic program has been removed, but still have files, this isn't one of them.

    First make sure you can see hidden files/folders by going to start / Control Panel / folder Options / view and check the box show hidden and system files.  While there, also uncheck to hide extensions of known file types (this will be useful to you later).

    Go to http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx and get Autoruns and run it to check your startup items.  Search for this file.  If you find it, delete it or uncheck the box allowing it to boot at startup.  Will not get rid of the file itself, but it must stop the logon dialog box (a step in the right direction).  Restart after you did it to see if it still appears.  If so, return here after having tried other options that follow.

    Now open Windows Explorer and go to that location and select the file and click on delete.  I guess you have tried this and it didn't work.  It gives you an error message when you try?  What is the EXACT text of this error (including all codes)?

    Try to use one of the following free products to remove the file/folder.  Unlocker to: http://www.softpedia.com/get/System/System-Miscellaneous/Unlocker.shtml or file Assassin http://www.malwarebytes.org/fileassassin.php (with or without forcing the deletion: http://www.mydigitallife.info/2008/12/27/force-delete-cannot-delete-locked-or-in-used-files-or-folders-with-fileassassin/). These programs often work when normal functions remove Vista not work correctly.

    If you are unable to file (getting an "Access denied" error while trying to to navigate on this one), you will need to change the permissions for folders and files to give you the permissions of all rights, even appropriating. You may need to go to advanced to check special permissions to see if there is any restrictions there including inherited properties of parent folders). Here are some instructions on how to do

    To view your permissions, right-click on the file/folder, click Properties, and check the Security tab.  Check the permissions you have by clicking on your user name (or group of users).  Here are the types of permissions, you may have: http://windows.microsoft.com/en-US/windows-vista/What-are-permissions.  You must be an administrator or owner to change the permissions (and sometimes, being an administrator or even an owner is not sufficient - there are ways to block access (even if a smart administrator knows these ways and can move them - but usually should not because they did not have access, usually for a very good reason).)  Here's how to change the permissions of folder under Vista: http://www.online-tech-tips.com/windows-vista/set-file-folder-permissions-vista/.  To add take and the issuance of right of permissions and ownership in the right click menu (which will make it faster to get once it is configured), see the following article: http://www.mydigitallife.info/2009/05/21/take-and-grant-full-control-permissions-and-ownership-in-windows-7-or-vista-right-click-menu/.

    To resolve this problem with folders, appropriating the files or the drive (as an administrator) and give you all the rights.  Right-click on the folder/drive, click Properties, click the Security tab and click on advanced and then click the owner tab.  Click on edit, and then click the name of the person you want to give to the property (you may need to add if it is not there--or maybe yourself). If you want that it applies to subfolders and files in this folder/drive, then check the box to replace the owner of subcontainers and objects, and click OK.  Back and now there is a new owner for files and folders/player who can change the required permissions.  You can change now switched to read-only (even if the main folder indicates that they are always read-only - you can access yourself as the owner).  You can keep them in read-only to other users, customers and administrators even (although they can support themselves and access, if they wish, and it is really not that you can do to stop it except protect the file with a password by using a 3rd party product.)  Here is more information on the ownership of a file or a folder: http://www.vistax64.com/tutorials/67717-take-ownership-file.html.  To add take ownership in the menu of the right click (which will make it faster to get once it is configured), see the following article: http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/.

    Once you have the appropriate permissions and ownership if necessary, you should be able to delete the file normally or with one provided above both programs.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

Maybe you are looking for

  • rose icloud bak on new phone

    When I'm trying to get my back-up for my new phone, is asking my password, this isn't my apple ID. That's one of my contacts. I have reset my password and revived, but same result. Help, please.

  • Example: Pavilion dv5 2133la: FORNUIS WINDOWS

    Señores: Para mi Notebook of virus, a cargo Windows UN tecnico clean no cuando mi PC from which the the tapeworm adquri origin. Ahora no me for a fornuis por temo perder todo lo as tengo o ser procesada por Microsoft. Editor model HP queadquiri media

  • Adobe photoshop tutorial

    Can someone tell me how to use adobe photoshop to create a label for my business purpose using layers?

  • Why do I get green unwanted in all my photos and my videos?

    Original title: color Why do I get green unwanted in all my photos and my videos?

  • set default Windows Live Photo Gallery

    I use Win 7 for many years but I started only recently strongly use Online Photo Editor. I always open to looking at pictures in Photo Viewer, and then decide if I want to open them and with which application. Early on, I checked the box for "No. did