Filling  Substring with Spaces..!

Hi,
I have a requirement where i have to fill a string which is having
specific length with spaces and the result should have the same
number of spaces as the characters in the string..!
In my case the string is a numeric one..!
My program is as follows ...
But i am not getting the desired output..!
declare
l_sstr varchar2(11) := '12345678901';
l_mstr varchar2(11);
l_len number;
begin
l_len := length(l_sstr);
for i in 1..l_len
loop
l_mstr := l_mstr||translate(substr(l_sstr,i,1),'1234567890',CHR(32));
dbms_output.put_line(l_mstr);
dbms_output.put_line('length'||length(l_mstr));
end loop;
dbms_output.put_line('string'||l_mstr);
--dbms_output.put_line('length'||length(l_mstr));
end;
Thanks in Advance..

Please change like this.
declare
l_sstr varchar2(11) := '12345678901';
l_mstr varchar2(11);
l_len number;
begin
l_len := length(l_sstr);
for i in 1..l_len
loop
l_mstr := l_mstr || translate(substr(l_sstr,i,1),substr('1234567890',i,1),chr(32));
dbms_output.put_line(l_mstr);
dbms_output.put_line('length'||length(l_mstr));
end loop;
dbms_output.put_line('string'||l_mstr);
--dbms_output.put_line('length'||length(l_mstr));
end;

Similar Messages

  • Filling a rectangle space with a photo image in an applet

    I'm creating a web page that will display an image of a persons wall and I want to be able to use the mouse to draw a rectangle on the image of the wall and fill the space with a selected photo image.
    I have found out that you can use the MousePress and MouseDrag events to draw a rectangle and "paint" the rectangle in a componant inside the applet. But I'm not sure how to fill the rectangle with an image instead of a color. Can someone tell me if there is an AWT or Swing method that can do this?
    I was thinking of filling the applet window with a label component and then filling it with the wall image. Then some how using the coordinates given from the drag event to creat a new label component and filling it with the photo image. Hope I'm on the right path. Thanks for all the help.

    Great thanks, I looked it up in the docs and I found one that will work for me but I'm not sure how to use the arguements. It's the drawImage method that uses the scalebility. This would work perfect seeing as though the image to be posted will be various sizes. Can any one explain this method in more detail for me. Thanks again.

  • Hi, will my downloadable PDF forms look exactly the same as when I upload but with spaces filled in?

    Hi, will my downloadable PDF forms look exactly the same as when I upload but with spaces filled in?

    Not sure I understand the question. Are you talking about the "Download Response as PDF" feature (to see the PDF filled out with the filler's data) or the "Download Submission Enabled PDF" (to sent to people to fill out)?
    If you imported a PDF in FormsCentral, the Submission Enabled PDF will look exactly the same as the imported PDF plus a submit button
    If you designed the form in FormsCentral and save the Submission Enabled PDF it will look very similar to the web form (switch the view in the Design Tab to Page View to see what the PDF will look like)
    The PDF doesn't use skip logic or show/hide logic so this mean that the PDF always shows all the form elements
    I answered a similar question today. See http://forums.adobe.com/thread/1251981
    Gen

  • Iphoto 9.6.1 how do I leave pix space blank, filled in with background color

    I'm making a photo book using iPhoto 9.6.1  How do I leave pix space blank, filled in with background color?   I want half the page taken up with a picture and the other half colored in.

    There's actually an option to iPhoto Library Manager that makes this all almost work flawlessly (and work well enough for me). With the exception of Photo Albums that the pictures are part of, if you select "Library > Rebuild Library..." and then select "Scavange Orphaned Photos" check box, then it will put all the Photos and Movies into the "Scavanged Photos" album. It matches the modified pictures to their originals. It preserves all the event names and photo groupings. All the meta-data I could spot check it got right (although with 44k pictures, I only checked a few). If you fail to select this option, however, it will find no pictures at all when it goes to rebuild the library (this was true of the small test libraries I tried as well as the big, monster 280GB library I just finished converting). The conversion process took 5 hours to run, but in the end produced a library my new iPhoto can read and that I can interact with. I'll be suggesting to the iPhoto Library Manager folks a notation that would estimate the number of Orphaned Photos and display that number as a hint to the user that the option would be useful.
    Edited: Thanks to Old Toad and LarryHN for their help in finding which of the many options to transition this library to 9.5.1 I needed to use. Sorry if I took my frustration of the past several months out on you guys for generously trying to help me.

  • Unable to access files with spaces in the path

    Hi all, I am accessing files which reside on the server using a java applet.
    The typical path of a file could be:
    http://192.168.0.2/agat/data/AF190701 0003.agt
    (not the space in the filename).
    When I try to open this file using a URL object:
    URL file = new URL(filename);
    BufferedReader in = new BufferedReader(new InputStreamReader(file.openStream()));
    I get exception 400 ( I think) whihc I assume is file cant be found.
    However when I rename the file (to get rid of that space) and also change the filename variable to suit. The file is opened as expected.
    What should I do to make the applet able to open paths with spaces? Or is this just not possible.
    I did try including quotes with the special characte precessor:
    filename = "/"http://192.168.0.2/agat/data/AF190701 0003.agt/""
    But this didnt work either, please could someone tell what I need.
    Thanks.

    Thanks guys, although before I got your replies I did the following - it seems to work, but shall try your suggestions.
    while (file.lastIndexOf(" ") >0)
    String temp;
    int num = file.lastIndexOf(" ");
    temp = file.substring(0, num) + "%20" + file.substring(num+1, file.length());
    file = temp;
    }

  • My hardrive keeping filling up with "other" files. How do I delete them and keep them from building back up?

    I am new to Apple/MacBook this year, so far I am just plain frustrated. My harddrive keeps filling up with "other" files and I dete them and they always come back from using apple mail. I have used tech support and filters but it still happens over and over. Any help here? I would SO appreciate it!

    Boot in safe mode by shutting down, then restarting and holding down the shift key, keeping it down until you see the Apple logo on the display. Safe mode is slow to boot and run.
    While in safe mode, use a tool such as the one linked below to explore your volume and find out what's taking up a lot of space:
    OmniDiskSweeper - Products - The Omni Group
    Don't launch any other applications. After completing this test, and deleting some files, reboot as usual (not in safe mode.)

  • HT1688 HELP! My Iphone4 is filling up with unknown memory

    My iphone is filling up with unknown memory. If a delete an app or photos the unknown memory will take up that free space as well. This is my second iphone to do this. My computer has no viruses and I have reset my phone. The only thing i can think of that might have something to do with it is my SIM card.

    Thank You for responding,
       I didn't think SIM cards had to do with it either, but that's all I could come up with. Yes I have restored my phone as a new device. I didn't put any music or ringtones on it. After a few weeks it start filling up again. I clean my phone daily (deleting messages,clearing history, cookies, ect.) If it is corruption, then how did my previous iphone and this iphone have the same problem? Some days it will show I have free memory but most of the time it is showing full. The only way I can take pictures is through Facebook.....
    With my previous iphone I had apple support on the phone and on my computer trying to figure out the problem. Everything they instructed me to do would fix the problem (temporarily)  Eventually they sent me another iphone4, the one I have now. I set it up as a new device, it was fine for about 2months. Now it is doing the same thing.....

  • Hi ya'll, I'm having problems with patterns. Error 519, what's going on?? URGENT!!! Can't seem to fill layers with user defined patterns

    I've never had this problem before, I noticed improvements a few days ago regarding pattern tool but the last few days I've been unable to fill layers with a user defined pattern. This is one of the main reasons I use photoshop and it's giving me a headache!!! I have to turn in some patterns by monday and this is not working, please fix it!!

    First a clarification:  You are NOT addressing Adobe here in these user forums.
    BOILERPLATE TEXT:
    Note that because this is boilerplate text, not all points may apply to any given, specific poster.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • DW CS5.5 in OSX Lion - anyone seeing problems with Spaces?

    DW seems to have problems with Spaces in OSX Lion.Switching into DW from other spaces is not 'clean'. When DW comes up, sometimes the Code/Design is blank white, and windows within the workspace don't show their headers. Clicking on Code/Design redraws that window, but the only thing that seems to recover the window headings is switching to and then back from another app in the same Space.
    Seems like screen redrawing triggered by switching apps within the same Space is a little different than that triggered by switching apps across Spaces.
    Anyone else seeing this?

    I did report it as a bug, using the link kindly provided by you and Shocker.
    The two Macs I've tried this on now are a Mac Pro and an iMac, so there's no Automatic Graphics Switching option to enable/disable.
    I was only able to check this out on the iMac late last night.
    Hardware synopsis:
    Mac Pro Early 2009
    Processor  2 x 2.93 GHz Quad-Core Intel Xeon
    Memory  16 GB 1066 MHz DDR3 ECC
    Graphics  NVIDIA GeForce GT 120 512 MB
    Software  Mac OS X Lion 10.7 (11A511)
    The iMac isn't available to me at the moment, I'll have to fill in missing details later (can't remember the exact graphics card info):
    DW is CS5, not CS5.5, was also installed well ahead of the Lion upgrade
    Computer is iMac instead of Mac Pro, about 1.5 years old
    Quad-Core i7
    4GB memory
    Mac OS X Lion 10.7
    I used the same procedure upgrading to Lion on the iMac...
    Ran Cocktail 'Pilot' to clean up the system prior to install (runs Daily, Weekly, Monthly maintenance scripts, clears System, User, and Internet caches, repairs disk permissions on "Macintosh HD", clears log files)
    OS10.7 was purchased through the Mac App Store and installed.
    JRE installed.
    DW on the iMac exhibited the same problem as on the Mac Pro.
    To reproduce:
    Start DW, open a file for editing
    Start any other app in the same Space
    Open a new Space, open any other app there.
    Test switching between DW and other apps in the same Space compared with switching between DW and other apps in different Spaces.
    Consistently, when I switch between DW and other apps in the same Space, DW's windows/panels redraw properly,
    and when I switch between DW and other apps in different Spaces, DW's windows/panels don't redraw properly.

  • Format a number, pad with spaces

    I want a simple way to format a number into a String, but have it padded with spaces. My code started like this:
    DecimalFormat myFormatter = new DecimalFormat("###.00");
    String output = myFormatter.format(12.5);
    The output is '12.50' when I want ' 12.50' (leading space). There's got to be an easy way to do this!
    Thanks for your help

    What you probably wanted to do was print some numbers in a column (of JTextArea's, for example) so that the decimal points line up.
    I wasted some more time and came up with the following:  String formattedNumber = numberPad(number, "###.00E0");
      static String numberPad(double number, String format) {
        int desiredDecimalPosition = format.indexOf('.');
        DecimalFormat numFormat = new DecimalFormat(format);
        String formattedNum = numFormat.format(Math.abs(number));
        formattedNum = formattedNum.replace('E', 'e');
        int exponentPosition = formattedNum.indexOf('e');
        if (exponentPosition < 0)
          exponentPosition = formattedNum.length();
        formattedNum = formattedNum.replaceFirst("e0", "");
        int decimalPosition = formattedNum.indexOf('.');
        formattedNum = (number > 0 ? " " : "-") + formattedNum;;
        if (decimalPosition < 0)
          decimalPosition = exponentPosition;
        int padding = desiredDecimalPosition - decimalPosition;
        if (padding > 0)
          formattedNum = "        ".substring(8 - padding) + formattedNum;
        return formattedNum;
      }Now it turns out that- despite the fact that I've told DecimalFormat to format precisely 2 digits to the right of the decimal, it sometimes randomly gives me 3, and (less often) 1!
    All this trouble just to try save 16kB of Henrik Bengtsson's sprintf in my jar file...

  • Time machine is turned off but my startup disk keeps filling up with backup files on a hidden volume.

    My Time Machine is turned off but my system startup drive keeps filling up with backup files in a hidden volume. How can I stop this? When Time Machine was turned on, the destination was set to an external drive.  I was completely confused about what was happening until I used Houdini to reveal the hidden volume. I have no idea how it got created or why it keeps filling up with no backup application running to my knowledge.  Thanks.

    Please read this whole message before doing anything.
    Download this, or a similar tool if you prefer:
    OmniDiskSweeper - Products - The Omni Group
    Boot in safe mode. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    During startup, you will see "Safe Boot" on the login screen, which appears even if you normally log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Safe mode is slower than normal, and some things won’t work at all, possibly including wireless networking.
    Does your boot volume continue to fill up? Use the above tool to explore the volume and find out where the space is going.

  • Dynamically fill area with words from list

    hello all,
    i would like to fill the entire area of a flash movie with
    words.
    the movie starts out blank, but as time goes on the visible
    area fills with words from a pre-written list.
    ideally, the height and width of the words is randomized
    within a range i determine.
    i wouldn't mind being pointed to a tutorial that shows how to
    fill an area with randomly-sized rectangles, that might help.
    eventually, i want to be able to control the speed of the
    area being filled with an input device (mouse or external sensor)
    but first things first!
    am using flash 8.
    thank you,
    aya.

    You may want to check this out. It fills a space with words
    and keeps filling the empty space. I'ts open source so you can take
    peak inside.
    http://www.levitated.net/daily/levEmotionFractal.html

  • Mail logs filling up disk space: why? ok to delete?

    Computer spec’s: 2GHz Mac Mini with 4GB of RAM and a 250GB flash storage. I am running OS 10.9.5 and Mail 7.3.
    Problem: My storage has been mysteriously filling up, with about 200 GB in “other” in “about this Mac.” I would delete files and then it would fill up again. Using WhatSize, I determined that Mail logs took up 107GB, with two files accounting for most of this (details below).
    Questions: Is it safe to delete Mail logs? Why are some so big? Why are dates so random? Can I prevent large mail logs in the future?
    In Library/Containers/com.apple.mail/Data/Library/Logs, here are the dates and size of the largest files named in format: [long stream of numbers and letters]=imap.gmail.com.txt
    July 15: 55.8 GB
    Sept 3: 47.17 GB
    Aug 6: 5.43 GB
    Aug 6 3.64 GB
    Then there are six files between 312GB and 867.2 GB and many others named in the above format and multiple files named in this format: [date]_GmailDelete.log dating back to May 21.
    Thank you for your help.

    Hi, I'm having a very similar trouble but I do not use Gmail. I have several mail accounts, essentially from 2 mail server providers (hosting and registrar companies), most accounts in IMAP but some still in POP.
    I'm on a PowerBook pro, retina 15 mid 2012, 2.7 Ghz Intel Core i7, with 750 Gb SSD disk", running OS X Yosemite 10.10.2
    Since one week I experience the same problem, disk space filling up without appearant reasons. In the Data/Library/Logs/Mail I have 541 files (!!), some of them very huge. I have deleted a 75 Gb file and another of 13Gb, but I still have files from more than 9Gb (ten file obver 1Gb).
    I have changed passwords in my accounts and even to access my hosting proividers. But no changes.
    Deleting the huge files in the Logs doesn't seem to affect Mails except the fact that I have to enter all POP / IMAP and SMTP passwords :-(
    In the logs, the hugest files are "2015-03-18_IMAPMailboxSyncEngine.log", 2mail.mydomainname-d44f367b-6650-4ddf-9cc6-4fe08822ab6c.txt", "2015-03-21_SocketStreamEvents.log", "137778C8-7690-48F3-877E-48D400322117-mail.mydomainename.txt", and I have plenty like that.
    The question is, where the problemn comes from ??
    When deleting the log files ... the problem is not solved because it continues to filling it with new logs, again ..
    Thank you for your assistance and help.

  • Bug in the copy cluster roles wizard - CSV reparse points cannot have names with spaces

    Hi All,
    I have identified a bug in the copy cluster roles wizard in 2012 R2, which is preventing me from migrating my clusters from 2008 R2 & 2012 to 2012 R2.
    The bug surfaces when you attempt to copy a VM role from a 2008 R2 or 2012 cluster that has a CSV reparse point name that contains spaces as follows:
    The role appears to copy across fine, but once you've migrated the CSV and brought it online followed by starting the VM, the VM configuration resource promptly fails along with the VM.
    The issue can be spotted inside the copy cluster roles wizard, where it presents itself by removing all text after the first space in the name to read "C:\ClusterStorage\CSV" rather than "C:\ClusterStorage\CSV
    Test Disk 3" as follows:
    The bug only appears for VMs on CSVs with a reparse point name containing spaces - all other scenarios succeed.
    After searching through the registry on the new cluster, you can clearly see that the VM role hasn't been correctly copied.
    It shows a value called SharedVolumeMappings with the data C:\ClusterStorage\CSV|<guid>|<integer>
    Whereas it should show the data C:\ClusterStorage\CSV Test Disk 3|<guid>|<integer>
    If you modify the data in the SharedVolumeMappings value in both
    0.Cluster\Resources\<VM guid> and Cluster\Resources\<VM guid> keys, the VM will start and work correctly.
    The problem for me is that I have many VMs on many different CSVs all with spaces in the names of the reparse point! Its not feasible for me to go through the registry for every copied VM on every node of the new cluster, as this would take a very long time
    and would be prone to errors that could cause further problems.
    Can anyone provide any help on this? A hotfix for the issue would be great, if anyone from Microsoft is reading :-)
    My deadline to get the VMs migrated to the new cluster is the 21st February, so I would really like to have a solution to the problem before then if at all possible.
    Many thanks in advance,
    Tom

    Hi Subhasish,
    Thanks for the reply, glad that its something that is reproducible!
    Do you have any idea of timescale? Or is it likely that I will have to modify the registry as above to get this working?
    If I am going to have to modify the registry, please can you let me know if the resolution I have tested above is safe and viable? Or are there other settings that I will need to change to make the cluster fully aware of the proper path to the CSVs for its
    VMs?
    Also, is there a known procedure for renaming the reparse point whilst VMs are running on it? This would allow me to negate the issue before copying the roles to the new cluster :-)
    Thanks again,
    Tom

  • Problems with spaces in file or directory names and Word.exe

    Hi
    I'm trying to open a file with Word from my java aplication, and I have a problem with some file/directory names.
    I have this
    String cmd = "c:\\Program Files\\Microsoft Office\\Office10\\WINWORD.EXE" + " " + path;
    try {
    Runtime.getRuntime().exec(cmd);
    } catch (Exception errorea){ }
    Here is what happens:
    if path is something like this: "c:\people\info.doc" , there's no problem, Word opens the document, but if path contains blank spaces somewhere, it doesn't work. For example:
    path = "c:\Documents and Settings\info.doc"
    path = "c:\Hi everybody\info.doc"
    path = "c:\tests\test results.doc"
    with the above examples it doesn't work :( Word tries to open "c:\Documents", "c:\Hi" or "c:\tests\test".
    Can anyone help? thanx a lot ! : )

    Hint: use the variant Runtime.exec(String[] args).
    Create a command array, with each token in a separate argument. The entire filename with spaces goes into one argument.

Maybe you are looking for

  • ADF 11g : Live messages about status/errors while uploading a Excel file

    Hi, Im using ADF 11.1.1.2. In the ADF application, there is a module where the user will upload a excel sheet with lot of data(50,000 lines) in multi sheets. We are validating the data against certain business validations and inserting this data into

  • ALV  ONF4 event

    Hi All, I have used the ALV onF4 event for F4 help for a field in an ALV display....But the problem is that this is not getting triggered on pressing F4..... What might be the problem.. I have referred the program : BCALV_EDIT_08. -SatyaPriya

  • Lpc of a voice

    hello there! I am new to labview and can any body please help me to calculate the lpc of a sound/voice. Actually my project is based on voice recognition Solved! Go to Solution.

  • Problems reading an icon

    I have written a Java tool where I read an image to be stamped in a panel by private ImageIcon ic = new ImageIcon(getClass().getResource("khmer.gif")); private JLabel p7 = new JLabel(ic); The picture file "khmer.gif" is included in the project. This

  • Trouble connecting to cable modem

    Cable company is telling me my mac has a problem connecting to the modem.  Will not connect to a dynamic IP address.  Any ideas on what is wrong.  I can connect fine at Best Buy and wirelessly to my neighbors but not to their modem in my home.