Remove at "space" of a string? How the best way to remove it???

I get a string
e.g:
string s="a b c   d     s  c s g w".
I want as results:
e.g:
string s="a b c d s c s g w".
How the best way to remove it??? I don't want that (value.Split("     ","")).

You could use regex as follows:
System.Text.RegularExpressions.Regex.Replace(yourString, " +", " ")

Similar Messages

  • How the best way to use the defringe tool in removing chromatic aberration?

    I am having a problem with LR 4.2 in correcting chromatic aberation.  When I try to use the "defringe tool" I receive the following error message, "Cannot set the purple or green fringe color.  Please sample a representative fringe color agian."  However, I can see the sampled pixel in the pallette and read the RGB values.  What am I doing wrong?

    In this case, where the dropper doesn't work, you might have to slide the color selectors left or right to visually select the desired color. So, if for example, you have a blue fringe, you could slide the color selectors to the left so instead of surrounding purple, they now surround more blue-ish colors. Sometimes when you do this however, some areas are "corrected" from blue to something else that should NOT be  corrected. So, you have to "protect" the areas that shouldn't be corrected. This blog post explains it all: http://blogs.adobe.com/lightroomjournal/2012/04/new-color-fringe-correction-controls.html

  • Just wondering how the best way to work using 2 computers and 2 people.

    If you have 2 computers, a main one doing creative changes and the other person on a second computer doing metadata and keywords, is it possible to keep them synced, so the keyword info etc is kept up to date on the main computer? Would it just be to export the new keywords for that catalogue each time?
    It is a big Library of 300,000 images that needs to be keyworded to find images easily. I am new to this but trying to help someone sort out their Library.
    Many thanks for your help.

    I don't know the answer. But here's what I do know:
    Brainstorming, not well-organized thoughts...:
    In general, you need to make sure the image developer is not working on the same images at the same time as the keyworder. Lightroom considers keywords and develop settings on a par (and will overwrite both or neither when syncing, importing, ...), so however you do it, unless you discover some clever workaround, the 2 people will need to coordinate which images are off-limits while the other is working on them. That said, here are some ideas:
    * Figure out a way to strip settings/metadata of one type before doing the sync (e.g. from the xmp).
    * Save develop settings (as snapshot), sync with keyworder's versions, restore develop settings (by re-selecting the snapshot). Unfortunately, this would need to be done on a per-image basis, since there is no way to apply a snapshot in any automated or bulk fashion.
    Note: this would be an easy plugin, but would have some (probably deal-breaking) limitations:
    1. Save develop settings in ram.
    2. Read xmp from keyworder (which will update keywords, but also overwrite develop settings).
    3. Restore develop settings from ram.
    The problem is that the SDK is missing a few develop settings, e.g. crop is missing, as is tone-curve enable/disable, and orientation. So, if developer had changed any of these things, they would not be restored after syncing keywords from xmp - not good, and one of the reasons I lobby with Adobe to make develop settings (available to plugins) complete.
    If plugins had access to snapshots for applying, that would also make a plugin solution a piece of cake.
    Another idea:
    - Export jpegs for keywording, with a special token in the filename, like "for-keywording" (I recommend PreviewExporter for fastest exporting).
    - Use John Beardy's Syncomatic to synchronize keywords from jpeg to original.
    Optional, instead of exporting, just make a physical copy using OS, and have keyworder import those and apply keywords. All else would be the same (syncomatic).
    (consider deleting exports/copies created just for keywording purpose, after syncing keywords...).
    This would also be a piece of cake for SQLiteroom, if you were willing to do some SQL+Lua programming:
    - Use SQL to query 2ndary catalog with keywords.
    - Use Lua to assign keywords to photos in master catalog.
    R

  • How do you move pictures to an external drive to open space on the Mac hard drive? Or what is the best way to store photos safely?

    How do you move pictures to an external drive to open harddrive space? Or what is the best way to store large photo files? Ive tried copy/cut and paste and it doesnt work. I have nothing on my Mac but photos and its telling me startup disk is too full to download updates.

    Are the photos being stored in iPhoto now?
    How is the external disk formatted?
    Allan

  • Step by Step, what's the best way to shoot slow-mo in HD?

    I've read so many articles on here about doing slow motion shooting in final cut but everyone of them left out some important details.
    i wanted to see if anyone could give me a step by step on how the best way to shoot something in slow motion in HD would be?
    i'm probably planning on just doing this in 720 instead of 1080, but i don't want that to begin to be the topic of discussion, just how how to do slow motion.
    some things i want to know about it:
    -what is a good shutter speed for this to make the movement look as smooth as possible
    -how many frames per second should i shoot? (my camera only goes up to 60fps)
    -should i use Cinema Tools in any way?
    -any adjustments i might need to do to the timeline in final cut when i drop it in there?
    -also, i'd want my whole project video to be done in 720/24p, but i'm guessing for the one shot i want in slow motion i'd have to shoot 720/60p. what do i need to do to get the 60fps footage to work right in a timeline set for 24fps?
    if you can't answer all of them, just some help would be greatly appreciated! Thanks!!

    -what is a good shutter speed for this to make the movement look as smooth as possible< </div>
    that's a tough call because the shutter speed will be determined by three things, your ability to understand what we tell you here, yoru photo subject, and the lighting conditions and ability to control them.
    -how many frames per second should i shoot? (my camera only goes up to 60fps)< </div>
    You can stop there, 60 is not nearly enough to achieve "smooth as possible" slow motion. You need at least 90 frames per second, 120 is even better, 180 is fabulous. You can research "overcranking," temporal resolution, and shooting slow motion for may hours on google.
    Post processing a video clip using optical flow is not a viable solution for most subjects. You must consider renting a camera that will do the job properly. If 60 fps is all you're willing or able to shoot, then you must diminish your expectations and carefully consider your photo subject.
    bogiesan

  • How is the best way to remove something from a photo?

    How is the best way to remove something from a photo?

    This is difficult to answer without fully knowing what you are trying to do.
    That said, a few excellent and user friendly retouching tools include:  The Spot Heealing Brush Tool, Healing Brush Tool, Patch Tool, and the Cloning Stamp Tool.

  • My Macbook pro was stolen 09/12, the police just returned it to me. I want to remove all the data and start over. Format the drive's etc. I have windows 7 on 1 partion and mountain lion OSX on the apple partition. How is the best way to do this?

    My Macbook pro was stolen 09/12, the police just returned it to me. I want to remove all the data and start over. Format the drive's etc. I have windows 7 on 1 partion and mountain lion OSX on the apple partition. How is the best way to do this?

    Have a look here...
    what-to-do-when-your-hard-drive-is-full.html

  • What is the best way to manage the file space given how much GB the video clips use up?

    I just downloaded a years worth of video off my HD camera.  I took up 125 GB on my hard drive.  What is the best way to manage this content going forward as there will be a lot more video to come in future years with small children!

    rule of thumb:
    SDef ~13GBs/h
    HDef ~30-40GBs/h ...
    latest investment of mine:
    ext.HDD, usb2 (=I have no trouble using usb2 for editing my short projects), 1.5TB=70€  ...
    ... which adds to ~4.2TB for my hobby, incl. back-up drives ...

  • What's the best way to removed unwanted files?

    I have an iMac G4 running OS X 10.4.11 with 1GB of DDR SDRAM. I'm wondering what's the best way to remove unwanted files from the RAM, if it's even possible. There are apps and other files I no longer need. If I can dump the unused files will it help the computer run a little faster? Can I eliminate the unwanted files some how by myself or do I need a program that does it? Thanks

    bad dad wrote:
    I have an iMac G4 running OS X 10.4.11 with 1GB of DDR SDRAM. I'm wondering what's the best way to remove unwanted files from the RAM, if it's even possible. There are apps and other files I no longer need. If I can dump the unused files will it help the computer run a little faster? Can I eliminate the unwanted files some how by myself or do I need a program that does it? Thanks
    Applications are stored perminately on the harddrive [ Macintosh HD ]. When applications are running that is when they appear in a window, they take up RAM. You see your running applications by using activity monitor:
    Macintosh-HD -> Applications -> Utilities -> Activity Monitor
    Application when they are not running, they do not take up RAM.  You will not see any performance improvement when you delete an application from your Harddrive.  [ unless you have filled up your harddrive ]
    Best to have greater than 2gig of free space on your Harddrive.  Many posters to these forums state that you need much more free space: 5 gig to 10 gig or 10 percent of you hd size.
    Most applications do not take up much space on the Harddrive.  I copy my unused application to a folder named additional applications.
    (0)
    Be careful when deleting files. A lot of people have trashed their system when deleting things. Place things in trash. Reboot & run your applications. Empty trash.
    Go after large files that you have created & know what they are.  Do not delete small files that are in a folder you do not know what the folder is for. Anything that is less than a megabyte is a small file these days.
    (1)
    Run
    OmniDiskSweeper
    "The simple, fast way to save disk space"
    OmniDiskSweeper is now free!
    http://www.omnigroup.com/applications/omnidisksweeper/download/
    This will give you a list of files and folders sorted by size. Go after things you know that are big.
    (2)
    This will save you a gig of space.
    Monolingual is a program for removing unnecessary language resources from Mac OS X,in order to reclaim several hundred megabytes of disk space. It requires at least Mac OS X 10.3.9 (Panther) and also works on Mac OS X 10.4 (Tiger). It worked for me on 10.4
    http://monolingual.sourceforge.net/
    A detailed write-up on how to use Monolingual:
    http://www.jklstudios.com/misc/monolingual.html
    (3)
    These pages have some hints on freeing up space:
    http://thexlab.com/faqs/freeingspace.html
    http://www.macmaps.com/diskfull.html
    (4)
    Buy an external firewire harddrive.
    (5)
    Buy a flash card.

  • What is the best way to remove applications?

    I would like to remove unused applications (iChat, Dashboard, iCalendar and so on...)
    I am running audio software and using CPU quite heavily.
    What wold be the best way to remove these types of applications completely and have as minimal running in the background possible??? (I have already turned off Bluetooth, Airport etc...)
    Should I install removal software or just send them all to the Trash bin?

    None of those applications are running unless you launch them. Dashboard widgets only use CPU time and RAM if they are running. If you quit all widgets in the Dashboard then there's no memory footprint or use of the CPU.
    If you don't want anything but essentials running then don't launch any applications and remove any Login Items from Accounts preferences.
    Just because an application is installed on the computer does not mean it is running unless you launch it or configure it to launch automatically. So there is no need to remove any of these applications or utilities.
    You will find some good books on Macs and computers in general at your local bookstore. Your question suggests that you could benefit by reading a few.
    As for how to uninstall applications that you have installed see the following:
    Uninstalling Software: The Basics
    Most OS X applications are completely self-contained "packages" that can be uninstalled by simply dragging the application to the Trash. Applications may create preference files that are stored in the /Home/Library/Preferences/ folder. Although they do nothing once you delete the associated application, they do take up some disk space. If you want you can look for them in the above location and delete them, too.
    Some applications may install an uninstaller program that can be used to remove the application. In some cases the uninstaller may be part of the application's installer, and is invoked by clicking on a Customize button that will appear during the install process.
    Some applications may install components in the /Home/Library/Applications Support/ folder. You can also check there to see if the application has created a folder. You can also delete the folder that's in the Applications Support folder. Again, they don't do anything but take up disk space once the application is trashed.
    Some applications may install a startupitem or a Log In item. Startupitems are usually installed in the /Library/StartupItems/ folder and less often in the /Home/Library/StartupItems/ folder. Log In Items are set in the Accounts preferences. Open System Preferences, click on the Accounts icon, then click on the LogIn Items tab. Locate the item in the list for the application you want to remove and click on the "-" button to delete it from the list.
    If an application installs any other files the best way to track them down is to do a Finder search using the application name or the developer name as the search term. Unfortunately Spotlight will not look in certain folders by default. You can modify Spotlight's behavior or use a third-party search utility, Easy Find, instead. Download Easy Find at VersionTracker or MacUpdate.
    Some applications install a receipt in the /Library/Receipts/ folder. Usually with the same name as the program or the developer. The item generally has a ".pkg" extension. Be sure you also delete this item as some programs use it to determine if it's already installed.
    There are also several shareware utilities that can uninstall applications:
    AppZapper
    CleanApp
    Yank
    SuperPop
    Uninstaller
    Spring Cleaning
    Look for them at VersionTracker or MacUpdate.
    For more information visit The XLab FAQs and read the FAQ on removing software.

  • What is the best way to double buffer in this case and how to do it....

    currently I have
    public class Frame1 extends JFrame{
    //inside this class I call up circle class, rectangle class, etc.... to draw
    }I am making a "paint" program, and I have individual classes to handle the paint methods heres an example:
    abstract public class Shape {
        public Shape() {
        public abstract void draw(Graphics g, Color c, int x, int y, int width,int height);
    }and then....
    public class Circle extends Shape{
        public Circle() {
        public void draw(Graphics g, Color c, int oldx, int oldy, int newx, int newy) {
            g.setColor(c);
            g.drawOval(Math.min(oldx, newx), Math.min(oldy, newy), Math.abs(oldx - newx), Math.abs(oldy - newy));
    }There is also a Rectangle class, line class.... etc! So my question to you is the following... what is the best way to implement double buffer in the individual classes? And how to do it?? And also.... the drawings should be kept inside a jPanel.
    Any bit of help is much appreciated Thank you!!

    You don't need to do double-buffering. Swing
    components are double-buffered by default. Just make
    sure you override paintComponent() and not paint().
    And even if you had to, why would there be any
    difference in implementation for your classes whether
    they paint to on- or off-screen graphics?I need to override paintComponent()? what if I don't...
    I am using JBuilder2005 and they automate somethings for me. So thats how they did it when they created the application they did this....
    public class Frame1 extends JFrame{
    /*** all my code here***/
    public class Application1 {
        boolean packFrame = false;
         * Construct and show the application.
        public Application1() {
            Frame1 frame = new Frame1();
            // Validate frames that have preset sizes
            // Pack frames that have useful preferred size info, e.g. from their layout
            if (packFrame) {
                frame.pack();
            } else {
                frame.validate();
            // Center the window
            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            Dimension frameSize = frame.getSize();
            if (frameSize.height > screenSize.height) {
                frameSize.height = screenSize.height;
            if (frameSize.width > screenSize.width) {
                frameSize.width = screenSize.width;
            frame.setLocation((screenSize.width - frameSize.width) / 2,
                              (screenSize.height - frameSize.height) / 2);
            frame.setVisible(true);
            try {
                jbInit();
            } catch (Exception ex) {
                ex.printStackTrace();
         * Application entry point.
         * @param args String[]
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    try {
                        UIManager.setLookAndFeel(UIManager.
                                                 getSystemLookAndFeelClassName());
                    } catch (Exception exception) {
                        exception.printStackTrace();
                    new Application1();
        private void jbInit() throws Exception {
    }

  • TS1314 I have lots of organized photos on my PC and I want to keep them organized to sync to ipad.... how is the best way to do this?

    I have spent a lot of time saving, organizing and arranging photos (for the last 7 years) on my PC, and would like to know the best way to transfer these, AND MAINTAIN THE ORGANIZATION OF THE FOLDERS, to my new ipad (and later, my iphone). I have a really good system, and I do not want to have to do it all over again, on the ipad. I DO NOT want to subscribe to another monthly service fee (i.e. the iCloud) but DO have iTunes on my PC.
    What is the simplest method to do this ?  I have tried synching, but, each time have lost photos (on my ipad) OR have had NO ORGANIZATION AT ALL to the photos once synced.  I have all these photos (5.6gb) in the My Pictures folder, then subdivided into years, then subdivided into events and months within the years.  So, my transfer of the My Picures folder, completely transfers all of them, but with NO further organization.  Again, I have spent years doing this, and don't want to have to re-invent the wheel. 
    Can someone advise (or even better, lead me to a youtube video) that accurately shows the best way to do this ?
    Thank you, in advance, for your help.
    p.s.  I particularly enjoy Dan Nations very informative articles on how to get the best from my products.  And, wish Apple would explain "how it works" regarding the syncing methods on the Operating System.  It is the only thing I "don't get" about using my iPad..... meanwhile I LOVE my new mini ! ! ! ! ! ! ! thanks Apple, for keeping things simple.... Please don't change that !

    Correct, it will only be one-level, the Photos app doesn't support sub-albums - the sub-folders photos will be included in the parent's album.
    If you select My Pictures at the top of the Photos tab when syncing, then you should get an album for each folder that is directly under it - so if I understand correctly what you described then that would mean an album for 2013, one for 2012 etc. And each of those should include all the photos in the subfolders under it - so 2013 would include the photos from the events and months subfolders under it.
    You can't sync them separately, only the contents of the last sync remains on the iPad, by not including a folder in the next photo sync you are effectively telling iTunes that you no longer want that folder/album on the iPad so it will be removed and be replaced by the contents of the new sync (you can't delete synced photos directly on the iPad, instead they are deleted by not including them in the next sync).
    The app that I use, Photo Manager Pro, allows you to select and copy a folder (via FTP), but you would need to select each subfolder individually, which if you have a lot would be time-consuming (I think that if you select '2013' it would ignore the folders beneath it).

  • I have an iphone4s and my two daughters have an iPod each. They both have used my apple id. How is the best way to change our their ids as I have been told we all need separate ids to be able to message each

    I have an iPhone and my two daughters both have iPods. They both use my apple Id and I would like to change their Id. . How is the best way to do this? My younger daughter had her iPod only last week and when she set it up, she ended up with all my phone contacts on Her iPod. If I change her apple Id will this remove the contacts from her iPod and leave mine intact on my phone?

    Anyone...anyone? Bueller...Bueller?

  • Hi how is the best way to do a " format " to the disc???

    I have a Macbook Pro for 3 years now, never ever did a "format to the disck" or other kind of re-instaling apple software! Now the Mac its more slow and saying that no have memori space. I want to delete everying and re-install again ( had a TimeMachine update ).
    How is the best way to do it?
    Thanks

    I don't do J2ME, but the best way I've run across is offscreen rendering and javax.swing.Timer
    If there is an equivalent in J2ME I highly recommend it.

  • HT3847 How is the best way to separate copied MP3 from AIFF files in my library?

    How is the best way to separate duplicate MP3 from AIFF files in my library?

    Zice wrote:
    I want higher resolution then afforded in the original download.
    Then why are you converting iTunes purchases?
    You cannot get higher resolution by converting  the original. This goes for converting anything, not just iTunes purchases.
    Creating an AIFF will simply make the file 10 time as large with zero increase in quality.
    Don't really want to debate value of creating the new version.
    Agreed.
    You are simply wasting time and drive space converting iTunes purchases to AIFF.

Maybe you are looking for

  • IMac multiple identities

    In Finder the "shared" window shows multiple versions of my iMac followed by brackets, (1), (2) etc. The connection between my MacBook and the iMac only seems to work with one of the bracketed versions while the macBook will only print to the unbrack

  • No audio on my Dell PC

    I installed DriverUpdate last March.  Suddenly getting messages ITunes not installed properly. and No audio devices detected, Codec error 10.  ?  any thoughts. Thx

  • ITunes 9.0 and Quicktime 7.6.? Issues

    So, I updated tonight to the new iTunes 9.0, and the accompanying QT 7.6.4, however when I went to open iTunes, I got an error window telling me that I was running QT 7.6.2, and that iTunes required QT 7.6.4, which is the one that should have loaded

  • How I can check if my Imac is Intel Core Duo Extreme

    Hello All, How I can check if my Imac is truly Intel Core Duo Extreme from Leopard? thank you, JD

  • Safari doesn't play video

    Just unpacked my new iMac, updated software and run the Safari. Safari doesn't play video (tutorials) on apple.com. Still, I can hear audio well. Please help.