Removing spaces in an URL
Hi,
I have white spaces in my URL which I want to replace with %20. How do I do that in J2ME as I do not have "replaceall" method of Strings.
thanks in advance,
@debug
This should do the trick:
public final static String replace( String source, String it, String that ) {
int idx;
StringBuffer tmp = new StringBuffer();
while ( ( idx = source.indexOf( it ) ) > 0 ) {
tmp.delete( 0, b.length() );
tmp.append( source.substring( 0, idx ) );
tmp.append( that );
tmp.append( source.substring( idx + it.length() ) );
source = tmp.toString();
return source;
}
Similar Messages
-
DW removes spaces surrounding updated library items
I've filed a bug with Adobe on this issue, but I'm wondering
if anyone else has received a fix for what I consider a
showstopping bug. In a nutshell, whenever I update a library item,
DW removes all spaces surrounding the updated library item, and
will even remove spaces surrounding unrelated library items during
the same operation.
For example, let's say I have a simple library item that
contains only the character "^". I insert that into a page to
render like this: "| ^ |", using normal spaces in the page code to
separate the three characters. If I then edit the library item to
use the character "-" instead, all updated pages will lose the
surrounding spaces: "|-|".
I've developed hundreds of library items over the years, and
can reproduce this over the last three versions of DW (8, MX 2004,
MX), on multiple computers using new code or existing sites. If I
edit a single library item, it corrupts hundreds of pages in a
large site, and I have to use special searches to find and fix the
error. I can't believe that noone else is affected by this problem,
or isn't using library items to the extent that I do.
I'd really like to see library item functionality repaired,
and this is my last appeal before finding a replacement for DW, Are
any DW developers monitoring this list?> bug is just as capable of affecting SSI
I don't think so. At least, I have never seen it happen. Have
you?
> Library items are particularly aimed at professionals
managing large
> sites.
I don't think so here, either. Why would one EVER choose a
Library item
over SSI? On a large site, you would upload hundreds if not
thousands of
files for each change with the former.
> It is an opportunity to
> create reusable code that can be managed and edited in
one central
> location, so
> that changes to a single file can be replicated
throughout the entire code
> base.
Precisely what SSI does, only better.
> Yes, it may be more desirable to use a server side
technology to control
> these bits through the use of variables and includes,
but I also build and
> manage high performance web servers, and no dynamic
language can even come
> close to the speed of delivering static files,
especially if you want to
> withstand a slashdotting or other unusual burst of
activity.
This is true - since Library items are design-time tools, you
take the
bandwidth hit on the upload side of things rather than on the
fetch side of
things.
> I'm hoping that someone at Adobe is monitoring this list
They do not. If you need to communicate with them, you must
contact them
directly. But you have been told that Adobe is aware of the
problem at
least twice - is that not enough?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"jorey" <[email protected]> wrote in message
news:[email protected]...
> The examples I used are overly simplified to more
clearly demonstrate the
> problem. Using a server-side technology is not relevant
to this issue.
> This
> bug is just as capable of affecting SSI, PHP, ASP, or
any other code
> edited and
> managed with Dreamweaver.
>
> Library items are particularly aimed at professionals
managing large
> sites.
> Who else would even be interested in such a feature? It
is an opportunity
> to
> create reusable code that can be managed and edited in
one central
> location, so
> that changes to a single file can be replicated
throughout the entire code
> base. To suggest that it is necessary to create slightly
different
> versions of
> code snippets to suit the individual needs of each
generated page utterly
> defeats the purpose of library items.
>
> As for the uses of library items, sure, I'll use it to
maintain large
> blocks
> of code, but it's also useful for little things that
change on a regular
> basis,
> such as names of people in specific roles, addresses,
phone numbers, email
> addresses, URLs, dates and other things that might
appear hundreds of
> times
> throughout a site in a variety of contexts. This bug has
serious
> repercussions,
> because it is not limited to the item being updated. You
could update a
> large
> block of code and have unpredictable changes occur
elsewhere. This is
> unacceptable, and may not be limited to library items,
but may also affect
> templates or any other site management function that
relies on the same
> routines.
>
> Yes, it may be more desirable to use a server side
technology to control
> these bits through the use of variables and includes,
but I also build and
> manage high performance web servers, and no dynamic
language can even come
> close to the speed of delivering static files,
especially if you want to
> withstand a slashdotting or other unusual burst of
activity.
>
> But as I mentioned, the type of code or use of the
library item is
> irrelevant.
> Dreamweaver as a programming editor has a serious bug.
It's broken, and
> needs
> to be fixed. I'm hoping that someone at Adobe is
monitoring this list and
> will
> understand that this is a problem that affects advanced
users and whole
> teams
> who have made extensive and productive use of this
feature before it was
> broken.
> -
HOw Can I remove faces from the URL
I know that it's in the web.xml file but as soon as i remove the faces part from the file nothing works. Someone please tell me how to properly remove "faces" from the url. Example http:.//localhost:8080/croot/Page1.jsp
Thanks in advanceI know that it's in the web.xml file but as soon as i remove the faces part from the file nothing works. Someone please tell me how to properly remove "faces" from the url. Example http:.//localhost:8080/croot/Page1.jsp
Thanks in advance -
How to remove space after paragrph in pages on ipad
Can't figure out how to remove space after each paragraph in Pages for Ipad
Settings > General > International > Region Format
Set it to your country to format numbers and dates in the way your country does. -
How to remove space below text?
In the screenshot below, how to remove space below text? I simply added a text box using the type tool and I get that extra space bellow the letter "B" that I don't need. I want to remove that space to center the letter within the octogon.
Thanks!You might consider giving the letter a negative baseline shift and aligning it to centre.
That way you can adjust it so that its anchor point coincides with the centre of the hexagon.
Like this:
Another thing: You may find it easier working with type if you hide bounding boxes. -
How do I remove space after paragraph?
Does Robohelp have the "Remove Space after paragraph" button for reducing the space between lines, like the one in Word?
In HTML the space after is controlled by the style in your CSS file. You need to edit the style in the Style Editor.
See www.grainge.org for RoboHelp and Authoring tips
@petergrainge -
How do I remove spaces or special characters within a cell for large amounts of data
Is there any shortcut to remove spaces between words and numbers within a cell?
Example:
Current: .5 lt PET (6)
Need: .5ltPET(6)
Is there any shortcut to remove special characters between numbers within a cell?
Example:
Current: 0--000--000--0
Need: 00000000Thanks Wayne.
I have been away from using Numbers or Excel for 4-5 years so it is slowly coming back to me. I am get that I need to use the SUBSTITUTE function however I am having trouble with getting it to work.
My Data
ST PAULI 12/12 NR
$27.16
12oz NR(12)
0--80660--95937--5
ST PAULI 4/6/12 NR
$28.76
12oz NR(6)
0--80660--95935--1
ST PAULI DK 12/12 NR
$0.00
12oz NR(12)
0--000--000--0
ST PAULI DK 4/6/12 NR
$28.76
12oz NR(6)
0--80660--95945--0
ST PAULI N/A 4/6/12 NR
$20.66
12oz NR(6)
0--80660--95955--9
CAYMAN JACK 4/6/12 NR
$29.12
12oz NR(6)
8--15829--01006--8
CAYMAN JACK 8OZ/12PK CAN
$23.18
8oz CAN(12)
8--15829--01061--7
TGIF LIIT 10OZ FROZEN POUCH
$35.80
10oz POUCH(24)
8--15829--01043--3
TGIF MARGARITA 10OZ FROZEN POUCH
$35.80
10oz POUCH(24)
8--15829--01047--1
TGIF PINA COLADA 10OZ FROZEN POUCH
$35.80
10oz POUCH(24)
8--15829--01045--7
TGIF STRAWBERRY 10OZ FROZEN POUCH
$35.80
10oz POUCH(24)
8--15829--01042--6
BALLAST PT BIG EYE IPA 1/2 BBL
$190.00
KEG 1984oz (1/2 KEG)
0--000--000--0
BALLAST PT BIG EYE IPA 1/6 BBL
$73.00
KEG 660.1oz (1/6 KEG)
0--000--000--0
BALLAST PT BIG EYE IPA 4/6/12 CAN
$33.00
12oz CAN(6)
6--72438--00052--7
There are many more but this is enough to show you. I need to remove all spaces from the First and Third Columns. I need to remove all (--) from the fourth. Where do I put in the substitute function and what is source sting, existing-string, new-string, and occurrence.
Thank You for your help. -
Web.show_document spaces in the URL problem
Hi,
I am using Web.Show_document to call the report from the form. Here some of the parameters having a spaces. It is giving a problem and report is not running. Pl guide me in this issue.
Thanks & Regards,
Gangi ReddyTry using %20 in place of the space in the URL.
-
How do I remove spaces and special characters from the file name during rendering?
I understand that I can set LR_renamingTokensOn to true, but I would like to replace all spaces in the file name with an underscore and remove characters not in the range A-Z and 0-9. What's the easiest way to achieve this?
local photo = catalog:getTargetPhoto()
local sesn = LrExportSession {
photosToExport = { photo },
exportSettings = {
-- ... (determine from export preset) - whatev you want, just be sure you set export directory: LR_export_destinationPathPrefix
LR_tokens = "{{custom_token}}",
LR_tokenCustomString = LrPathUtils.removeExtension( photo:getFormattedMetadata( 'fileName' ) ):gsub( "[ %c]", "" ) -- remove spaces and control characters
sesn:doExportOnNewTask() -
Removing Space Between Web Parts causes Horizontal Bar in Modals
Hello all,
I used the following to remove space between Web Parts, but am now getting a horizontal bar in my modals. Please assist:
http://www.ashokraja.me/tips/How-To-Remove-Extra-Space-Around-the-Web-Part-In-SharePoint-2013
Thanks!
Kelly
Personal Blog: http://thebitsthatbyte.comI removed it using the following CSS, which aligns our spacing:
Control spacing between Web Parts*/
.ms-webpart-cell-vertical
margin-top:
0px;
margin-bottom:
0px;
Personal Blog: http://thebitsthatbyte.com -
HT201364 how do i remove space from my start up disk
How do i remove space from my start up disk?
Do you mean "make" space on your HD?
Freeing Up Space on The Hard Drive
1. See Lion/Mountain Lion/Mavericks' Storage Display.
2. You can remove data from your Home folder except for the /Home/Library/ folder.
3. Visit The XLab FAQs and read the FAQ on freeing up space on your hard drive.
4. Also see Freeing space on your Mac OS X startup disk.
5. See Where did my Disk Space go?.
6. See The Storage Display.
You must Empty the Trash in order to recover the space they occupied on the hard drive.
You should consider replacing the drive with a larger one. Check out OWC for drives, tutorials, and toolkits.
Try using OmniDiskSweeper 1.8 or GrandPerspective to search your drive for large files and where they are located. -
How to remove space from a variable in a smartform
Hi,
I have a problem in displaying a variable in a smartform..The variable shows some blank space that preceeds the data.
for eg:,
variable = 18.000.
How to remove space before 18.000?To remove the decimal places for quantity and rate/quantity , use the syntax to restrict the number of digits after decimal places. The syntax is
&symbol(.N)&
where N is number of decimal places.
Since you dont want decimals use &symbol(.0)&
For the other case it depends on how the currency is represented , any way try using the syntex &symbol(T)&
Please give me reward point If it is useful
Thanks
Murali Poli -
How to remove space below the table in smartforms
how to remove space below the table in smartforms
maintain a loop counter for item say count
and in text editer write
if count > 6
new-page.
endif. -
How remove space in column ?
In a.newunit column I have spaces before data. I tried to use TRIM and LTRIM -- but doesn't work :(
What else I can use?
SELECT LTRIM(u.scode), LTRIM(a.newunit)
FROM unit u,
aaa_test a
WHERE LTRIM(u.scode) = LTRIM(a.newunit)Can you explain what "doesn't work" means, preferrably with an example (i.e. DDL for the Unit and AAA_Test tables, INSERT statements, and a query that returns the incorrect results)?
TRIM will remove spaces at the beginning and end of a value, LTRIM will remove spaces at the beginning of a value. Potentailly, you don't really have spaces at the beginning of your data. Potentially, you are misinterpreting something (in which case seeing what constitutes "not working" is critical).
Justin -
Remove spaces and special characters from a form field
Hi,
I am tragically new to all of this, but am trying to create a form in Adobe Acrobat 9. I am trying to use a Custom Format script to take inputs in a form field and automatically remove spaces and special characters (hyphens specifically). For example, if a user inputs "RAN-99 06" I would like it to change to "RAN9906." I found this script that will not let users input special characters
if (!event.willCommit) {
event.change = event.change.replace(/[\$#~%\*\*\^\-\(\)\+=\[\]\{\};\"\<\>\?\|\\\!]/g, "");
And that's okay, but I can't figure out how to disallow spaces. Also, the perference would be for a script to allow users to input the data as they like, but to clean it up after they leave the text field.
Thanks in advance!From the description, I assume that the script is currently in the Keystroke event. In fact, that would be a most logical way to have it; simply ignore anything unwanted when entered.
If you want to allow the user to enter anything, but "clean it up" when done, you would place your code in the Validate event. You will have to adjust your Regular Expression so that it works globally, but that's the whole difference. This will change the value.
Note that you can also enter the code into the Format event. However, that would only change the visual representation of the value, but internally, the value would remain as entered.
Hope this can help.
Max Wyss.
Maybe you are looking for
-
My current laptop is about three years old and got a virus. Had to wipe it clean. Now my Ipod Touch-2nd generation is not recognizing it as the primary original computer and says it is registered on another computer. What can I do to safeguard my
-
Trouble uploading website using iWeb 09 FTP
Hello All, About 2 years ago I used iWeb to upload my website. At the time I had to use Website Maestro for the FTP. Recently I bought a new iMac and used iWeb 09 to change several things on my website. I viewed all the videos on how to upload your s
-
I've authorized my computer but i still can't burn music
I followed the guide how to burn, i created a playlist and then authorized my computer but i keep getting a message saying it can not burn because i need to authorize this computer.please help it's driving me mad! hp Windows XP
-
Sync problem "not authorized to sync from this computer"!!
When I want to sync my iphone with application that I download to my itunes in my comuter. it gives error and says you are not authorized to sync your iphone at this computer???Why not??
-
InDesign Speicherprobleme und Druckvorgaben und Paletteneinstellungen gehen verloren
Hin und wieder bestehen Speicherprobleme im Adobe InDesign CC 2014. Zurücksetzten bzw. löschen der Preference und auch InDesign deinstallieren und neu installieren hat nicht geholfen. Auch eine Anmeldung mit einem andern Benutzer tritt das gleiche Pr