Search Results

Search found 11915 results on 477 pages for 'copy'.

Page 13/477 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • How to Implement Project Type "Copy", "Move", "Rename", and "Delete"

    - by Geertjan
    You've followed the NetBeans Project Type Tutorial and now you'd like to let the user copy, move, rename, and delete the projects conforming to your project type. When they right-click a project, they should see the relevant menu items and those menu items should provide dialogs for user interaction, followed by event handling code to deal with the current operation. Right now, at the end of the tutorial, the "Copy" and "Delete" menu items are present but disabled, while the "Move" and "Rename" menu items are absent: The NetBeans Project API provides a built-in mechanism out of the box that you can leverage for project-level "Copy", "Move", "Rename", and "Delete" actions. All the functionality is there for you to use, while all that you need to do is a bit of enablement and configuration, which is described below. To get started, read the following from the NetBeans Project API: http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/spi/project/ActionProvider.html http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/spi/project/CopyOperationImplementation.html http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/spi/project/MoveOrRenameOperationImplementation.html http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectapi/org/netbeans/spi/project/DeleteOperationImplementation.html Now, let's do some work. For each of the menu items we're interested in, we need to do the following: Provide enablement and invocation handling in an ActionProvider implementation. Provide appropriate OperationImplementation classes. Add the new classes to the Project Lookup. Make the Actions visible on the Project Node. Run the application and verify the Actions work as you'd like. Here we go: Create an ActionProvider. Here you specify the Actions that should be supported, the conditions under which they should be enabled, and what should happen when they're invoked, using lots of default code that lets you reuse the functionality provided by the NetBeans Project API: class CustomerActionProvider implements ActionProvider { @Override public String[] getSupportedActions() { return new String[]{ ActionProvider.COMMAND_RENAME, ActionProvider.COMMAND_MOVE, ActionProvider.COMMAND_COPY, ActionProvider.COMMAND_DELETE }; } @Override public void invokeAction(String string, Lookup lkp) throws IllegalArgumentException { if (string.equalsIgnoreCase(ActionProvider.COMMAND_RENAME)) { DefaultProjectOperations.performDefaultRenameOperation( CustomerProject.this, ""); } if (string.equalsIgnoreCase(ActionProvider.COMMAND_MOVE)) { DefaultProjectOperations.performDefaultMoveOperation( CustomerProject.this); } if (string.equalsIgnoreCase(ActionProvider.COMMAND_COPY)) { DefaultProjectOperations.performDefaultCopyOperation( CustomerProject.this); } if (string.equalsIgnoreCase(ActionProvider.COMMAND_DELETE)) { DefaultProjectOperations.performDefaultDeleteOperation( CustomerProject.this); } } @Override public boolean isActionEnabled(String command, Lookup lookup) throws IllegalArgumentException { if ((command.equals(ActionProvider.COMMAND_RENAME))) { return true; } else if ((command.equals(ActionProvider.COMMAND_MOVE))) { return true; } else if ((command.equals(ActionProvider.COMMAND_COPY))) { return true; } else if ((command.equals(ActionProvider.COMMAND_DELETE))) { return true; } return false; } } Importantly, to round off this step, add "new CustomerActionProvider()" to the "getLookup" method of the project. If you were to run the application right now, all the Actions we're interested in would be enabled (if they are visible, as described in step 4 below) but when you invoke any of them you'd get an error message because each of the DefaultProjectOperations above looks in the Lookup of the Project for the presence of an implementation of a class for handling the operation. That's what we're going to do in the next step. Provide Implementations of Project Operations. For each of our operations, the NetBeans Project API lets you implement classes to handle the operation. The dialogs for interacting with the project are provided by the NetBeans project system, but what happens with the folders and files during the operation can be influenced via the operations. Below are the simplest possible implementations, i.e., here we assume we want nothing special to happen. Each of the below needs to be in the Lookup of the Project in order for the operation invocation to succeed. private final class CustomerProjectMoveOrRenameOperation implements MoveOrRenameOperationImplementation { @Override public List<FileObject> getMetadataFiles() { return new ArrayList<FileObject>(); } @Override public List<FileObject> getDataFiles() { return new ArrayList<FileObject>(); } @Override public void notifyRenaming() throws IOException { } @Override public void notifyRenamed(String nueName) throws IOException { } @Override public void notifyMoving() throws IOException { } @Override public void notifyMoved(Project original, File originalPath, String nueName) throws IOException { } } private final class CustomerProjectCopyOperation implements CopyOperationImplementation { @Override public List<FileObject> getMetadataFiles() { return new ArrayList<FileObject>(); } @Override public List<FileObject> getDataFiles() { return new ArrayList<FileObject>(); } @Override public void notifyCopying() throws IOException { } @Override public void notifyCopied(Project prjct, File file, String string) throws IOException { } } private final class CustomerProjectDeleteOperation implements DeleteOperationImplementation { @Override public List<FileObject> getMetadataFiles() { return new ArrayList<FileObject>(); } @Override public List<FileObject> getDataFiles() { return new ArrayList<FileObject>(); } @Override public void notifyDeleting() throws IOException { } @Override public void notifyDeleted() throws IOException { } } Also make sure to put the above methods into the Project Lookup. Check the Lookup of the Project. The "getLookup()" method of the project should now include the classes you created above, as shown in bold below: @Override public Lookup getLookup() { if (lkp == null) { lkp = Lookups.fixed(new Object[]{ this, new Info(), new CustomerProjectLogicalView(this), new CustomerCustomizerProvider(this), new CustomerActionProvider(), new CustomerProjectMoveOrRenameOperation(), new CustomerProjectCopyOperation(), new CustomerProjectDeleteOperation(), new ReportsSubprojectProvider(this), }); } return lkp; } Make Actions Visible on the Project Node. The NetBeans Project API gives you a number of CommonProjectActions, including for the actions we're dealing with. Make sure the items in bold below are in the "getActions" method of the project node: @Override public Action[] getActions(boolean arg0) { return new Action[]{ CommonProjectActions.newFileAction(), CommonProjectActions.copyProjectAction(), CommonProjectActions.moveProjectAction(), CommonProjectActions.renameProjectAction(), CommonProjectActions.deleteProjectAction(), CommonProjectActions.customizeProjectAction(), CommonProjectActions.closeProjectAction() }; } Run the Application. When you run the application, you should see this: Let's now try out the various actions: Copy. When you invoke the Copy action, you'll see the dialog below. Provide a new project name and location and then the copy action is performed when the Copy button is clicked below: The message you see above, in red, might not be relevant to your project type. When you right-click the application and choose Branding, you can find the string in the Resource Bundles tab, as shown below: However, note that the message will be shown in red, no matter what the text is, hence you can really only put something like a warning message there. If you have no text at all, it will also look odd.If the project has subprojects, the copy operation will not automatically copy the subprojects. Take a look here and here for similar more complex scenarios. Move. When you invoke the Move action, the dialog below is shown: Rename. The Rename Project dialog below is shown when you invoke the Rename action: I tried it and both the display name and the folder on disk are changed. Delete. When you invoke the Delete action, you'll see this dialog: The checkbox is not checkable, in the default scenario, and when the dialog above is confirmed, the project is simply closed, i.e., the node hierarchy is removed from the application. However, if you truly want to let the user delete the project on disk, pass the Project to the DeleteOperationImplementation and then add the children of the Project you want to delete to the getDataFiles method: private final class CustomerProjectDeleteOperation implements DeleteOperationImplementation { private final CustomerProject project; private CustomerProjectDeleteOperation(CustomerProject project) { this.project = project; } @Override public List<FileObject> getDataFiles() { List<FileObject> files = new ArrayList<FileObject>(); FileObject[] projectChildren = project.getProjectDirectory().getChildren(); for (FileObject fileObject : projectChildren) { addFile(project.getProjectDirectory(), fileObject.getNameExt(), files); } return files; } private void addFile(FileObject projectDirectory, String fileName, List<FileObject> result) { FileObject file = projectDirectory.getFileObject(fileName); if (file != null) { result.add(file); } } @Override public List<FileObject> getMetadataFiles() { return new ArrayList<FileObject>(); } @Override public void notifyDeleting() throws IOException { } @Override public void notifyDeleted() throws IOException { } } Now the user will be able to check the checkbox, causing the method above to be called in the DeleteOperationImplementation: Hope this answers some questions or at least gets the discussion started. Before asking questions about this topic, please take the steps above and only then attempt to apply them to your own scenario. Useful implementations to look at: http://kickjava.com/src/org/netbeans/modules/j2ee/clientproject/AppClientProjectOperations.java.htm https://kenai.com/projects/nbandroid/sources/mercurial/content/project/src/org/netbeans/modules/android/project/AndroidProjectOperations.java

    Read the article

  • Deep Copy using Reflection in an Extension Method for Silverlight?

    - by didibus
    So I'm trying to find a generic extension method that creates a deep copy of an object using reflection, that would work in Silverlight. Deep copy using serialization is not so great in Silverlight, since it runs in partial trust and the BinaryFormatter does not exist. I also know that reflection would be faster then serialization for cloning. It would be nice to have a method that works to copy public, private and protected fields, and is recursive so that it can copy objects in objects, and that would also be able to handle collections, arrays, etc. I have searched online, and can only find shallow copy implementations using reflection. I don't understand why, since you can just use MemberwiseClone, so to me, those implementations are useless. Thank You.

    Read the article

  • Recursive function for copy of multilevel folder is not working.

    - by OM The Eternity
    Recursive function for copy of multilevel folder is not working. I have a code to copy all the mulitilevel folder to new folder. But in between I feel there is problem of proper path recognition, see the code below.. <?php $source = '/var/www/html/pranav_test'; $destination = '/var/www/html/parth'; copy_recursive_dirs($source, $destination); function copy_recursive_dirs($dirsource, $dirdest) { // recursive function to copy // all subdirectories and contents: if(is_dir($dirsource)) { $dir_handle=opendir($dirsource); } if(!is_dir($dirdest)) { mkdir($dirdest, 0777); } while($file=readdir($dir_handle)) {/*echo "<pre>"; print_r($file);*/ if($file!="." && $file!="..") { if(!is_dir($dirsource.DIRECTORY_SEPARATOR.$file)) { copy ($dirsource.DIRECTORY_SEPARATOR.$file, $dirdest.DIRECTORY_SEPARATOR.$dirsource.DIRECTORY_SEPARATOR.$file); } else{ copy_recursive_dirs($dirsource.DIRECTORY_SEPARATOR.$file, $dirdest); } } } closedir($dir_handle); return true; } ?> from the above code the if loop has a copy function as per requirement, but the path applied for destination here is not proper, I have tried with basename function as well.. but it didnt got the expected result.. below is the if loop i am talking about with comment describing the output... if(!is_dir($dirsource.DIRECTORY_SEPARATOR.$file)) { $basefile = basename($dirsource.DIRECTORY_SEPARATOR.$file);//it gives the file name echo "Pranav<br>".$dirdest.DIRECTORY_SEPARATOR.$dirsource.DIRECTORY_SEPARATOR.$file;//it outputs for example "/var/www/html/parth//var/www/html/pranav_test/media/system/js/caption.js" which is not correct.. copy ($dirsource.DIRECTORY_SEPARATOR.$file, $dirdest.DIRECTORY_SEPARATOR.$dirsource.DIRECTORY_SEPARATOR.$file); } as shown above the i cannot get the files and folders copied to expected path.. please guide me to place proper path in the function....

    Read the article

  • Can a Shadow Copy of SQL 2000 databases files be used as a restore?

    - by Keith Sirmons
    Howdy, I have a SQL 2000 instance (version 8.00.760) that is on a drive that gets regular shadow copies. Can a shadow copy be used to restore the database? It seems possible to stop the SQL service, restore the Data folder from the shadow copy (includes msdb, master, model, temp, and the user databases, then restart the service. Would the files be in a crash consistent case in the worst case? If so, when restarting the service wouldn't it recover as if the power were pulled from the server? Thank you, Keith

    Read the article

  • What's a fast way to copy a lot of files from an internal hard-drive to external (USB) storage?

    - by jonathanconway
    I have a large amount of data - about 500 GB - on the internal hard drive of a desktop PC. This includes music, videos, PDFs... you name it. I want to copy everything to an external USB hard drive (1.5 tb capacity). The desktop PC runs Ubuntu. To being with, I simply plugged in and mounted the hard drive and dragged the top-level folder onto the drive. It's started copying, but it seems to be proceeding very slowly. About 10 minutes later and it's only done about 500 MB. I'm sure this is slower than what I could achieve with less total data. So I'm wondering if there's a quicker way of doing this. Would it be better to copy it in portions of 500MB or so, rather than all at once?

    Read the article

  • How can I copy and paste formatted text in Excel?

    - by Landy
    Before I ask question, I've searched but only found ways of copy and paste "formatted cell". That's not what I need. I want to use an example to explain my requirement: There are 2 cells in a sheet. Cell_A's text is "aaaaabbbbb", and "aaaaa" is green, and "bbbbb" is red. Cell_B's text is "ccccc" and "ccccc" is black. I want to copy and paste "bbbbb" from Cell_A to Cell_B and keep "bbbbb" in red. But in my environment(Office 2007), "bbbbb" is changed to black as "ccccc", the default format of Cell_B. Is there an easy way to implement my requirement?

    Read the article

  • Copy/Pasting data from SQL Server to Excel splits up text into multiple columns?

    - by Paul
    I've got a problem pasting data from the result grid of SQL Server 2005 to an excel 2007 spreadsheet. I have a query in SQL Server that returns 2 columns (a number column and a text column) On one computer here i can happily copy (right-click copy) and then just right-click and paste into an excel spreadsheet. no problem. On another computer here when i try and paste into excel it splits the text column up and pastes the text into multiple columns based on spaces between words. For example if one of the rows has... Paste me please ...in it then when pasting into excel it splits the text and pastes each work into a seperate column within excel. We've tried comparing options in both SQL Server & excel with the computer it works fine on but can see no differences. Any ideas welcome Thanks

    Read the article

  • Program to Queue Files for Copy/Move/Delete in linux?

    - by laliga
    I've search the net for Linux's answer to something like Teracopy (Windows)... but could not find anything suitable. The closest things i got are: Krusader. Mentioned in their features but indicated as 'not implemented yet'. MiniCopier. A java based app http://a.courreges.free.fr/projets/minicopier/minicopier-en.php rsync is not an option. Can someone recommend me a simple file copy tool that can queue files for copy/move/delete? Preferably if I can drag and drop from Nautilus. If something like this does not exist, can someone please tell me why? ...am I the only person that needs something like this?

    Read the article

  • Copy or Export Byobu screen?

    - by kmassada
    One of the best things about byobu is the scrollback feature in a given session. I have been working on something, and I have tons of lines in the current scrollback session and I want to copy everything to a file, how to?? According to the screen home page, looks like you can do this? but when I'm done I do a search for all those files, can't find them. C-a h (hardcopy) Write a hardcopy of the current window to the file "hardcopy.n". C-a H (log) Begins/ends logging of the current window to the file "screenlog.n". For the screen commands to work, I have to be in screen mode, I believe, and not sure how to check that? kenneth@dv7:~$ ps -ef | grep byobu kenneth 16245 16173 0 05:18 pts/12 00:00:00 grep --color=auto byobu kenneth 25935 1 0 Dec14 ? 00:21:26 /usr/bin/xfce4-terminal -x byobu-launcher kenneth 25938 25935 0 Dec14 pts/0 00:00:00 tmux -2 -f /usr/share/byobu/profiles/tmuxrc new-session /usr/bin/byobu-shell kenneth 25962 1 1 Dec14 ? 00:37:31 tmux -2 -f /usr/share/byobu/profiles/tmuxrc new-session /usr/bin/byobu-shell kenneth 25963 25962 0 Dec14 pts/1 00:00:00 sh -c /usr/bin/byobu-shell This is from the byoby man page and I absolutely don't know what it does? I tried, it, and looked around, can't tell. Ctrl-a ~ - Save the current window's scrollback buffer there's also enter, copy mode, select with space key, and press enter to copy, I do that, the screen displays gibberish for 10 seconds refreshes, done. cat >> ~/log.output << COMM --paste using ctrl a ] I think-- COMM this confirms the copy paste works, but when I press enter, nothing get saved to that log file, I've checked, I do have write privileges in my home directory. lol the select all, from the xfce4-terminal doesn't go far enough, and scrolling back with the mouse, well won't work, no need to try it, I know byobu buffer doesn't work like that.

    Read the article

  • Sponsored Giveaway: Free Copies of WinX DVD Copy Pro for All How-To Geek Readers

    - by The Geek
    Have you ever wanted to make a backup of a DVD, or even rip it to an ISO file to use on your computer without the original optical disc? You can use WinX DVD Copy Pro to make this happen, and we’ve got a giveaway for all HTG readers. To get your free copy, just click through the following link to download and get the license code, as long as you download it by December 20th. In addition, an iPhone / iPad Video Software Pack will be presented as the second round gift from December 21st to January 2nd, 2013. For Windows users: http://www.winxdvd.com/giveaway/ WinX DVD Copy Pro has many features, including this list, which we copied straight from their site: Supports latest released DVDs. Protect your DVD disc from damage. Copy DVD to DVD, ISO image, etc. 9 advanced DVD backup schemes. Support Disney’s Fake, scratched DVDs and Sony ARccOS bad sector. Secure Yourself by Using Two-Step Verification on These 16 Web Services How to Fix a Stuck Pixel on an LCD Monitor How to Factory Reset Your Android Phone or Tablet When It Won’t Boot

    Read the article

  • Copy to USB memory stick really slow?

    - by Eloff
    When I copy files to the USB device, it takes much longer than in windows (same usb device, same port) it's faster than USB 1.0 speeds (1MB/s) but much slower than USB 2.0 speeds (12MB/s). To copy 1.8GB takes me over 10 minutes (it should be < 3 min.) I have two identical SanDisk Cruzer 8GB sticks, and I have the same problem with both. I have a super talent 32GB USB SSD in the neighboring port and it works at expected speeds. The problem I seem to see in the GUI is that the progress bar goes to 90% almost instantly, completes to 100% a little slower and then hangs there for 10 minutes. Interrupting the copy at this point seems to result in corruption at the tail end of the file. If I wait for it to complete the copy is successful. Any ideas? dmesg output below: [64059.432309] usb 2-1.2: new high-speed USB device number 5 using ehci_hcd [64059.526419] scsi8 : usb-storage 2-1.2:1.0 [64060.529071] scsi 8:0:0:0: Direct-Access SanDisk Cruzer 1.14 PQ: 0 ANSI: 2 [64060.530834] sd 8:0:0:0: Attached scsi generic sg4 type 0 [64060.531925] sd 8:0:0:0: [sdd] 15633408 512-byte logical blocks: (8.00 GB/7.45 GiB) [64060.533419] sd 8:0:0:0: [sdd] Write Protect is off [64060.533428] sd 8:0:0:0: [sdd] Mode Sense: 03 00 00 00 [64060.534319] sd 8:0:0:0: [sdd] No Caching mode page present [64060.534327] sd 8:0:0:0: [sdd] Assuming drive cache: write through [64060.537988] sd 8:0:0:0: [sdd] No Caching mode page present [64060.537995] sd 8:0:0:0: [sdd] Assuming drive cache: write through [64060.541290] sdd: sdd1 [64060.544617] sd 8:0:0:0: [sdd] No Caching mode page present [64060.544619] sd 8:0:0:0: [sdd] Assuming drive cache: write through [64060.544621] sd 8:0:0:0: [sdd] Attached SCSI removable disk

    Read the article

  • How to copy items using Nintex Workflow

    - by ybbest
    Nintex does not offer copying items from one SharePoint library to another out of box. However, it is not hard to implement one yourself. You can use the copy.asmx web services to achieve this. Here are the steps below and you can download the source here 1. Create a UDA with the following parameters: 2. Call the copy.asmx service to copy the item from SouceItemUrl to DestinationItemUrl 3. If your destination document library has versioning and check-in/out turned on , you can use list.asmx to check in your file as below: 4. You need to create constant of Credential type named SP_WORKFLOW_WS as below 5. Here is how it looks like in the Workflow designer. 6. To call this UDA, you can perform the following in your workflow

    Read the article

  • Copy diagram with swimlanes in Enterprise Architect

    - by blomqvist
    This is a post mostly to myself, so that when I forget this I can come here and check it out :) (I forget about ctrl-b from time to time) When copying diagrams from Enterprise Architect you can use ctrl-B to include the swim-lanes. A normal ctrl-c will not give you the swim-lanes. A side effect is that ctrl—b gives you a copy of the whole diagram, you cannot select what objects to copy. So marking objects first or pressing ctrl-A to selects all is both unnecessary and meaningless since ctrl-b seems to mean: “copy the whole diagram now and include all the stuff in there, even the swimlanes” (which ctrl-A, ctrl-C does not).

    Read the article

  • Copy hangs in local network

    - by umpirsky
    I want to copy files from one Ubuntu system to another.They are both in local wireless network. I shared entire home dir on one, and tried to copy some files to another. It works for some time and then it just hangs at some point. I use Nautilus to copy files. Here is the example screenshot, it just hangs like this: After I cancel, Nautilus icon in lauchbar keeps progress bar, so I guess there is some problem. What can be the problem?

    Read the article

  • Intermittent Copy/Paste Problem in RDP

    - by Tara Kizer
    If you use RDP to remotely connect to your servers, you've probably encountered a clipboard issue where copy/paste stops working.  A quick Google search on the problem indicates you can easily fix the problem by logging out/logging back in or killing/restarting rdpclip.exe on the remote server.  Here's an article which covers this topic. But what do you do when copy/paste is intermittent?  It works one second, stops working for 5-30 seconds, and then on its own starts working again.  This is what’s occurring in our new non-production environment.  The DBA team is setting up 16 new physical servers and 5 new virtual machines.  I haven’t found a server where this ISN’T happening.  This intermittent copy/paste issue is driving me crazy!

    Read the article

  • Copy and Paste problems in Visual Studio 2010

    tweetmeme_source = 'alpascual';After installing Visual Studio 2010 I started having problems with Copy and Paste. Trying to find out how many users are being affected by this bug. The use case to reproduce the bug, just using VS2010 for a few minutes and eventually doing Control C and Control V to copy lines of code does not work. Using the menu to do the copy and paste also wont work. Looks like a problem in the clipboard itself IMHO. The set up of my computer. Windows 7 Professional with 4...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • what is the fastest way to copy all data to a new larger hard drive?

    - by SUPER user
    I was certain this would have been covered before, but I cannot find an answer amongst all the almost-duplicates that come up; sorry if I've missed something obvious. I have a full 320gb disk inside my machine, a new 1tb disk to replace it, and a USB 2.0 chassis. It is only data on a single partition, no OS/apps involved, and the old drive will be kept somewhere as backup (no secure wiping etc). The simple option would be to put new disk in USB chassis, copy files, then swap them over. But for USB pen drives, reading is around 4x faster than writing. If the same is true for a USB SATA chassis (is it?) then it would be significantly faster to swap the drives first and read from the old drive over USB, right? Then the other consideration is that copying lots of files is usually slower than a single file of equivalent size. Is Windows 7 smart enough to do everything in a single lump like that, or is there specialised software that should be used instead? (Even if SATA-SATA copying is faster than involving USB, knowing what to do when it isn't an option is useful information.) Summary: Does a USB SATA chassis suffer from a read/write inequality? (like a USB pen drive does, but unlike a direct SATA connection) Can Windows 7 do sequential access? (I can't find confirmation if Robocopy does this.) Or is it necessary to use a bootable CD/USB with something like Clonezilla to achieve sequential copy speeds?

    Read the article

  • Is it better to always copy and delete, rather than move?

    - by nbolton
    Generally speaking, I find myself panicking when I realise that if I cancel a file move, it could cause the target or source to be incomplete. This question applies to Windows and Unix-based platforms. I can never remember exactly how the move command works in either case. For example, if you're moving a directory; does it copy the entire directory, then delete it after, or does it copy then delete each file individually? I always realise after typing something like, mv verybigdir dest that I really should have typed cp -R verybigdir dest && rm verybigdir (where the && operator only moves to the next command if the first was successful) -- or is this pointless? What happens exactly when I press Ctrl+C half way through a move? Likewise, what exactly happens on Windows when I press the cancel button? I can't count the number of times I've moved something (the last time was when using svn) and had two directories, with split contents. I guess the answer is difficult, because not all applications move groups of files in the same way.

    Read the article

  • Copy TFS Build Definitions between Projects and Collections

    - by Jakob Ehn
    Originally posted on: http://geekswithblogs.net/jakob/archive/2014/06/05/copy-tfs-build-definitions-between-projects-and-collections.aspxThe last couple of years it has become apparent that using multiple team projects in TFS is generally a bad idea. There are of course exceptions to this, but there are a lot ot things that becomes much easier to do when you put all of your projects and team in the same team project. Fellow ALM MVP Martin Hinshelwood has blogged about this several times, as well as other people in the community. In particular, using the backlog and portfolio management tools makes much more sense when everything is located in the same team project. Consolidating multiple team projects into one is not that easy unfortunately, it involves migrating source code, work items, reports etc.  Another thing that also need to be migrated is build definitions. It is possible to clone build definitions within the same team project using the TFS power tools. The Community TFS Build Manager also lets you clone build definitions to other team projects. But there is no tool that allows you to clone/copy a build definition to another collection. So, I whipped up a simple console application that let you do this. The tool can be downloaded from https://onedrive.live.com/redir?resid=EE034C9F620CD58D!8162&authkey=!ACTr56v1QVowzuE&ithint=file%2c.zip   Using CopyTFSBuildDefinitions You use the tool like this: CopyTFSBuildDefinitions  SourceCollectionUrl  SourceTeamProject  BuildDefinitionName  DestinationCollectionUrl  DestinationTeamProject [NewDefinitionName] Arguments SourceCollectionUrl The URL to the TFS collection that contains the team project with the build definition that you want to copy SourceTeamProject The name of the team project that contains the build definition BuildDefinitionName Name of the build definition DestinationCollectionUrl The URL to the TFS collection that contains the team project that you want to copy your build definition to DestinationTeamProject The name of the team project in the destination collection NewDefinitionName (Optional) Use this to override the name of the new build definition. If you don’t specify this, the name will the same as the original one Example: CopyTFSBuildDefinitions  https://jakob.visualstudio.com DemoProject  WebApplication.CI https://anotheraccount.visualstudio.com     Notes Since we are (potentially) create a build definition in a new collection, there is no guarantee that the various paths that are defined in the build definition exist in the new collection. For example, a build definition refers to server paths in TFVC or repos + branches in TFGit. It also refers to build controllers that definitely don’t exist in the new collection. So there will be some cleanup to do after you copy your build definitions. You can fix some of these using the Community TFS Build Manager, for example it is very easy to apply the correct build controller to a set of build definitions The problem stated above also applies to build process templates. However, the tool tries to find a build process template in the new team project with the same file name as the one that existed in the old team project. If it finds one, it will be used for the new build definition. Otherwise is will use the default build template If you want to run the tool for many build definitions, you can use this SQL scripts, compliments of Mr. Scrum/ALM MVP Richard Hundhausen to generate the necessary commands: USE Tfs_Collection GO SELECT 'CopyTFSBuildDefinitions.exe http://SERVER:8080/tfs/collection "' + P.ProjectName + '" "' + REPLACE(BD.DefinitionName,'\','') + '" http://NEWSERVER:8080/tfs/COLLECTION TEAMPROJECT'   FROM tbl_Project P        INNER JOIN tbl_BuildGroup BG on BG.TeamProject = P.ProjectUri        INNER JOIN tbl_BuildDefinition BD on BD.GroupId = BG.GroupId   ORDER BY P.ProjectName, BD.DefinitionName   Hope that helps, let me know if you have any problems with the tool or if you find it useful

    Read the article

  • How to copy and paste text from one page to another page using jquery?

    - by ischnura
    I have to copy repeatedly data (contact info such as name, surname, telephone...) from form A (page 1 in domain x.com) to form B (page 2 in domain y.com) I have been thinking about creating a chrome extension with the help of jquery to copy the data from form A, and inject it form B... I have a feeling that this is not the best way to solve this problem... What do you think is the best way to copy and paste data from pages in different domains?

    Read the article

  • Send copy of class to view class so it can render him? ( iPhone )

    - by Johannes Jensen
    I'm making a game for the iPhone, and I have a class called Robot. Then I have a class called View, which renders everything. I want to send a copy of my Robot, which I defined in my ViewController, and I send it to gameView (which is View *gameView), like this: robot = [Robot new]; [gameView setRobot: [robot copy]]; I tried to make a copy but that didn't work, I could also do it with a pointer to Robot (&robot) but sometimes it just crashes ? I tried this in my View.h @interface definition: @property (copy) Robot* robot; but I get the error /RobotsAdventure/Classes/View.h:24: error: setter '-robot' argument type does not match property type :/ Help? I'm pretty new at this, heh.

    Read the article

  • CArray doesn't call copy constructors on memory reallocations, now what?

    - by MMx
    Suppose I have a class that requires copy constructor to be called to make a correct copy of: struct CWeird { CWeird() { number = 47; target = &number; } CWeird(const CWeird &other) : number(other.number), target(&number) { } void output() { printf("%d %d\n", *target, number); } int *target, number; }; Now the trouble is that CArray doesn't call copy constructors on its elements when reallocating memory (only memcpy from the old memory to the new), e.g. this code CArray<CWeird> a; a.SetSize(1); a[0].output(); a.SetSize(2); a[0].output(); results in 47 47 -572662307 47 I don't get this. Why is it that std::vector can copy the same objects properly and CArray can't? What's the lesson here? Should I use only classes that don't require explicit copy constructors? Or is it a bad idea to use CArray for anything serious?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >