Remove all comma's in a string
I have a company name that can contain comma's in one or more positions. I need to replace these comma's with a space.
Example:
Dom,s Travel and Dom,s Express
Need it to read
Dom s Travel and Dom s Express
Thanks
Paul
> I need to replace these comma's with a space.
Similar Messages
-
How to remove all the blanks in a String
what I mean is that there is any convenient way to help remove the blanks (or carriage returns) in a string
Hi
Remove all blanks (whitespace,carriage return,tabs,etc..) once a time:
string.replaceAll("\\s", "");
Regards. -
How to remove all regex in a string?
hi guys,
for instance, if you have a string like below :
String s = "abcd!@3456*&^%()-+";
how can I remove all the regex and left and numeric and alphabet only?
I don't really know how to use the java.util.regex !
Thanks,
Mark
SdalkHmm it was only example how you can filter it
If you say that "replaceAll(...) is far, far simpler " then please can you write the code how it will look like?
prometheuzz wrote:
Juraj wrote:
Im not sure what you dont like on that code.Here are a couple of things I don't like about it:
- you didn't follow normal [Code Conventions|http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html] making your code hard to read;
- it's overly complicated for such a simple task. By complicated I mean it is not clear what that code is supposed to do when reading through it;
- you stuffed the majority of that code in your main method instead of creating a separate method;
- your algorithm loops through the AllowedChars array too much;
- you're concatenating Strings instead of using some sort of buffer.
At least it works right. It is the simpliest way how to filter StringsNo, replaceAll(...) is far, far simpler. -
Remove all non-number characters from a string
hi
How i can remove all non-number characters from a column ? for example , i have a column that contains data like
'sd3456'
'gfg87s989'
'45/45fgfg'
'4354-df4456'
and i want to convert it to
'3456'
'87989'
'4545'
'43544456'
thx in advOr in 9i,
Something like this ->
satyaki>
satyaki>with vat
2 as
3 (
4 select 'sd3456' cola from dual
5 union all
6 select 'gfg87s989' from dual
7 union all
8 select '45/45fgfg' from dual
9 union all
10 select '4354-df4456' from dual
11 )
12 select translate(cola,'abcdefghijklmnopqrstuvwxyz-/*#$%^&@()/?,<>;:{}[]|\`"',' ') res
13 from vat;
RES
3456
87989
4545
43544456
Elapsed: 00:00:00.00
satyaki>
{code}
I checked this with minimum test cases. It will be better if you checked it with other cases.
Regards.
Satyaki De. -
How can we remove the commas from the Formula value in SAP BW BEx query
Hi All,
How can we remove the commas from the Formula value in SAP BW BEx query
We are using the formula replacing with characteristic.The characteristic value needs to be display as number with out commas.
Regards
Venkat.Do you want to remove the commas when you run the query on Bex Web or in RSRT?
Regards -
How to remove all of the tags from a HTML file
Hi all,
I am developing a search program.
User will enter a word or some text in a textfield and after click on go button it will search the word from the html file which is reside in c: drive.
What I am trying to do is -- reading file and storing data/contents of the file in a String and so on............then store in a Vector.....so on.......
My question is ----- how can I remove all of the html tags such as: <p>, <b>,</b> <h1>, <strong>, or whatever from the String (where I store the data/contents of the html file) or from a HTML file.
I would appreciate sample code if anyone has any.
please help me in this way.
Thanks in advance
Thanks a lot.
amitindiaHi dear,
I got the link and have found examples.
thanks for solving my problem.
Thanks for your prompt reply.
amitindia
India -
Hi,
Is there anyway of using GREP (or some other magical wizardry) to create a paragraph style that automatically removes all spaces and forces words into lower case?
Strange request i know....I'm wanting to use it for datamerged email addresses.
Thanksso doing it through InDesign is a work around I'm exploring.
Excel has the 'LOWER' function and the ability to record macros for a quick find/replace on the spaces - so that's definitely a good option if it can't be solved purely in InDesign.
You can change case via scripting in InDesign. This AppleScript (OSX only) will set the case of the selected paragraph style to lower. It would be possible to add some code that would strip spaces as well:
tell application "Adobe InDesign CS6"
activate
set StyleList to name of every paragraph style of active document
set myDialog to make dialog with properties {name:"Document Paragraph Styles"}
tell myDialog
tell (make dialog column)
tell (make border panel)
tell (make dialog column)
make static text with properties {static label:"Choose a Style", min width:150}
end tell
tell (make dialog column)
set myPresetsDropdown to make dropdown with properties {string list:StyleList, selected index:0, min width:150}
end tell
end tell
end tell
end tell
set myResult to show myDialog
if myResult = true then
--+1 gets the correct name because list starts at 0
set myStyle to item ((selected index of myPresetsDropdown) + 1) of StyleList
else
return
end if
destroy myDialog
tell active document
set myStyle to paragraph style myStyle
repeat with j from 1 to (count stories)
repeat with i from 1 to (count paragraphs in story j)
if applied paragraph style of paragraph i of story j is myStyle then
--defines a variable to replace the generic this_text parameter in the handler
set SCText to the contents of paragraph i of story j
set contents of paragraph i of story j to my change_case_of(SCText)
end if
end repeat
end repeat
end tell
end tell
on change_case_of(this_text)
set the_comparison_string to "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
set the_source_string to "abcdefghijklmnopqrstuvwxyz"
set the_new_text to ""
repeat with thisChar in this_text
set x to the offset of thisChar in the_comparison_string
if x is not 0 then
set the_new_text to (the_new_text & character x of the_source_string) as string
else
set the_new_text to (the_new_text & thisChar) as string
end if
end repeat
return the_new_text
end change_case_of -
Removing non english characters from my string input source
Guys,
I have problem where I need to remove all non english (Latin) characters from a string, what should be the right API to do this?
One I'm using right now is:
s.replaceAll("[^\\x00-\\x7F]", "");//s is a string having chinese characters.
I'm looking for a standard Solution for such problems, where we deal with multiple lingual characters.
TIA
NitinNitin_tiwari wrote:
I have a string which has Chinese as well as Japanese characters, and I only want to remove only Chinese characters.
What's the best way to go about it?Oh, I see!
Well, the problem here is that Strings don't have any information on the language. What you can get out of a String (provided you have the necessary data from the Unicode standard) is the script that is used.
A script can be used for multiple languages (for example English and German use mostly the same script, even if there are a few characters that are only used in German).
A language can use multiple scripts (for example Japanese uses Kanji, Hiragana and Katakana).
And if I remember correctly, then Japanese and Chinese texts share some characters on the Unicode plane (I might be wrong, 'though, since I speak/write neither of those languages).
These two facts make these kinds of detections hard to do. In some cases they are easy (separating latin-script texts from anything else) in others it may be much tougher or even impossible (Chinese/Japanese). -
Removing Non-Ascii Characters from a String
Hi Everyone,
I would like to remove all NON-ASCII characters from a large string. For example, I am taking text from websites and would like to remove all the strange arabic and asian characters. How can I accomplish this?
Thank you in advance.I would like to remove all NON-ASCII characters from a large string. I don't know if its a good method but try this:
str="\u6789gj";
output="";
for(char c:str.toCharArray()){
if((c&(char)0xff00)==0){
output=output+c;
System.out.println(output);
all the strange arabic and asian characters.Don't call them so.... I am an Indian Muslim ;-) ....
Thanks! -
How to remove all log files at application end ?
I need to remove all log files from database dir.
Just the data file must be in database diretory after the application ends.
I´v tried:
1 - set_flags(DB_LOG_AUTOREMOVE, 1);
2 - txn_checkpoint(0, 0, DB_FORCE);
But ways one log file reminds.
Any bory nows how remove all log files at application end ?
I really need this. How can i do that in C++ ?
Thanks,
DelNetoHere's how I solved it
// At end of app.
// Commit tables.
pdbParam ->sync(0);
pdbUser ->sync(0);
// Close tables.
pdbParam ->close(0);
pdbUser ->close(0);
// Delete table objects.
delete m_pdbParam;
delete m_pdbUser;
// Commit all changes to the database.
penvDbEnv->txn_checkpoint(0, 0, DB_FORCE);
penvDbEnv->close(0);
delete penvDbEnv;
// Remove all logs files comes here.
DbEnv *penvDbEnv;
penvDbEnv = new DbEnv(0);
ui32EnvFlags = DB_CREATE |
DB_PRIVATE |
DB_INIT_LOCK |
DB_INIT_LOG |
DB_INIT_MPOOL |
DB_THREAD |
DB_INIT_TXN;
// Open the environment with full transactional support.
iResult = penvDbEnv->open("..\\database", ui32EnvFlags, 0);
// Get the list of log files.
char **pLogFilLis;
char **pLogFilLisBegin;
iResult = penvDbEnv->log_archive(&pLogFilLis, DB_ARCH_ABS | B_ARCH_LOG);
// This line resets the log sequence numbers from the database file.
// No actual log file is associated with the database.
iResult = penvDbEnv->lsn_reset("..\\database\\DATABASE.db", 0);
// Remove the log files.
if(pLogFilLis!= NULL)
// I don´t now how put spaces and tabs here, sorry about the "___".;-).
__for(pLogFilLisBegin = pLogFilLis; *pLogFilLis != NULL; ++pLogFilLis)
____iResult = remove(*pLogFilLis);
__free(pLogFilLisBegin);
// At this point no more log files exists at database directory.
penvDbEnv->close(0);
delete penvDbEnv;
// If i need remove the environment files, do this.
penvDbEnv = new DbEnv(0);
penvDbEnv->remove(("..\\database", 0);
delete m_penvDbEnv;
Thanks to Bogdan Coman for show me the way
DelNeto. -
How to remove all hyperlinks at once?
Hi guys,
I want to know how to remove all hyperlinks in a text at once. I know how to remove one link at a time. But it's time consuming if you paste a text with a lot of hyperlinks.
Thanks,
Adriano.Duplicate your document for safe then drag and drop the icon of the copy of the icon of this script saved as an application.
--[SCRIPT remove links]{code}
Enregistrer le script en tant qu'Application ou Progiciel : remove links.app
Déposez le sur le bureau par exemple.
Glisser-déposer l'icône d'un document Pages sur celle du script
va éliminer tous les Hyperliens et signets prédsents dans le document.
On peut également qlisser déposer un fichier index.xml.
+++++++
Save the script as an Application or an Application Bundle: remove links.app
Store it on the desktop for instance.
Drag and drop the icon of a Pages document on the script's icon
to remove the Hyperlinks and Bookmarks embedded in the document.
We may also drag & drop an index.xml file.
Yvan KOENIG (Vallauris, FRANCE)
16 février 2009
enhanced 17 février 2009
--=====
property removeBookmarks : true
true = remove the bookmarks
false = don't remove the bookmarks *)
property removeLinks : true
true = remove the Links
false = don't remove the Links *)
property liste : {}
--=====
on open (sel)
set theDoc to (item 1 of sel) as text
tell application "System Events" to tell disk item theDoc
set nn to name
set uti to type identifier
set isPackage to package folder
end tell
if nn is "index.xml" then
my traiteIndex(theDoc)
else if uti is not in {"com.apple.iwork.Pages.Pages", "com.apple.iwork.pages.sffpages"} then
error "Not a Pages document !"
else if isPackage then
-- here the document is a package
if theDoc ends with ":" then set theDoc to text 1 thru -2 of theDoc
tell application "Finder"
set the_index to (theDoc & ":index.xml")
set indexGzAvailable to exists file (the_index & ".gz")
set indexAvailable to exists file the_index
end tell -- Finder
if indexGzAvailable then
if indexAvailable then tell application "Finder" to delete file the_index
my expandIndex(the_index & ".gz")
my traiteIndex(the_index)
else
if indexAvailable then
my traiteIndex(the_index)
else
error "No Index available !"
end if
end if -- indexGzAvailable
else
-- here the document is a flat one
tell application "Finder"
set cont to (container of file theDoc) as text
set name of file theDoc to (nn & ".zip")
end tell -- Finder
set theDocZ to cont & nn & ".zip"
my expandDoc(theDocZ, theDoc)
tell application "Finder"
set name of file theDoc to (nn & "yk")
set theDocF to cont & nn & "yk"
set the_index to (theDocF & ":index.xml")
set indexAvailable to exists file the_index
end tell -- Finder
if indexAvailable then my traiteIndex(the_index)
end if -- nn …
end open
--=====
on traiteIndex(theIndex)
local theKey1, theKey2, theKey3, theKey4, theKey5, itm, itm1, itm2, itm2
my nettoie()
(* Lis le contenu du fichier Index.xml *)
set texte to read file theIndex from 1
if removeBookmarks then
(* supprime les descripteurs de signets *)
set theKey1 to "<sf:bookmark sf:name"
set theKey2 to "</sf:bookmark>"
if texte contains theKey1 then
set my liste to my decoupe(texte, theKey1)
repeat with i from 2 to count of my liste
set itm to my decoupe(item i of my liste, theKey2)
set itm1 to item 1 of itm
set itm1 to text (1 + (offset of ">" in itm1)) thru -1 of itm1
set itm2 to my recolle(items 2 thru -1 of itm, theKey2)
set item i of my liste to (itm1 & itm2)
end repeat -- i
set texte to my recolle(my liste, "")
end if
end if -- removeBookmarks
Here are samples of Hyperlinks in the index.xml file
--link to bookmark
<sf:p sf:style="paragraph-style-32">
<sf:bookmark sf:name="page 3" sf:ranged="true" sf:page="3">
page 3
</sf:bookmark>
<sf:br/>
--link to URL
<sf:p sf:style="paragraph-style-32">
<sf:link href="http://discussions.apple.com/thread.jspa?threadID=1905618&tstart=0" sf:style="SFWPCharacterStyle-7">
<sf:span sf:style="SFWPCharacterStyle-7">
Change cell color if number is different from previous cell
</sf:span>
</sf:link>
<sf:br/>
--link to an other Pages document
<sf:p sf:style="paragraph-style-32">
<sf:link href="pages:///Users/yvan_koenig/Documents/Sans%20titre%20-%20copie.pages#un%20 signet%20externe">
<sf:file-alias sf:file-alias="0000000001ae000200010c4d6163696e746f7368204844000000000000000000 000000000000c45c8cef482b00000008a77c1853616e73207469747265202d20636f7069652e7061 67657300000000000000000000000000000000000000000000000000000000000000000000000000 000000360f06c5c03419000000000000000000010002000009200000000000000000000000000000 0009446f63756d656e747300001000080000c45c70cf0000001100080000c5c0260900000001000c 0008a77c0008a76f00006bdf000200414d6163696e746f73682048443a55736572733a7976616e5f 6b6f656e69673a446f63756d656e74733a53616e73207469747265202d20636f7069652e70616765 7300000e0032001800530061006e00730020007400690074007200650020002d00200063006f0070 00690065002e00700061006700650073000f001a000c004d006100630069006e0074006f00730068 0020004800440012003455736572732f7976616e5f6b6f656e69672f446f63756d656e74732f5361 6e73207469747265202d20636f7069652e7061676573001300012f00001500020012ffff0000"/>
<sf:span sf:style="SFWPCharacterStyle-7">
vers autre document
</sf:span>
</sf:link>
<sf:br/>
if removeLinks then
(* supprime les descripteurs de liens *)
set theKey1 to "<sf:link href="
set theKey3 to "<sf:span sf:style="
set theKey4 to "</sf:link>"
set theKey5 to "</sf:span>"
if texte contains theKey1 then
set my liste to my decoupe(texte, theKey1)
repeat with i from 2 to count of my liste
set itm to my decoupe(item i of my liste, theKey4)
set itm1 to item 2 of my decoupe(item 1 of itm, theKey3)
set itm1 to text (1 + (offset of ">" in itm1)) thru -1 of itm1
set itm1 to item 1 of my decoupe(itm1, theKey5)
set itm2 to my recolle(items 2 thru -1 of itm, theKey4)
set item i of my liste to (itm1 & itm2)
end repeat -- i
set texte to my recolle(my liste, "")
end if -- texte contains
This piece of code takes care of a bug in the save as Pages '08 process.
A link to an other document is not completely disabled so the 'disabled' link remains blue.
The link is stored this way:
<sf:p sf:style="paragraph-style-32">
<sf:span sf:style="SFWPCharacterStyle-7">vers autre document</sf:span>
<sf:br/>
when it would be:
<sf:p sf:style="paragraph-style-32">
vers autre document
<sf:br/>
if texte contains theKey3 then
set my liste to my decoupe(texte, theKey3)
repeat with i from 2 to count of my liste
set itm to my decoupe(item i of my liste, theKey5)
set itm1 to item 1 of itm
set itm1 to text (1 + (offset of ">" in itm1)) thru -1 of itm1
set itm2 to my recolle(items 2 thru -1 of itm, theKey5)
set item i of my liste to (itm1 & itm2)
end repeat -- i
set texte to my recolle(my liste, "")
end if -- texte contains
end if -- removeLinks
set lineFeed to ASCII character 10
if texte contains (lineFeed & lineFeed) then set texte to my recolle(my decoupe(texte, lineFeed & lineFeed), lineFeed)
if texte contains (return & return) then set texte to my recolle(my decoupe(texte, return & return), return)
set eof of file theIndex to 0
write texte to file theIndex
my nettoie()
end traiteIndex
--=====
on decoupe(t, d)
local l
set AppleScript's text item delimiters to d
set l to text items of t
set AppleScript's text item delimiters to ""
return l
end decoupe
--=====
on recolle(l, d)
local t
set AppleScript's text item delimiters to d
set t to l as text
set AppleScript's text item delimiters to ""
return t
end recolle
--=====
on nettoie()
set liste to {}
end nettoie
--=====
(* Expands the zip file z in the container d, z and d are pathnames as strings *)
on expandDoc(z, d)
do shell script "unzip " & quoted form of (POSIX path of (z)) & " -d " & quoted form of (POSIX path of (d))
end expandDoc
--=====
on expandIndex(f)
do shell script "gunzip " & quoted form of (POSIX path of (f))
end expandIndex
--=====
on lisIndex_xml(f)
local t
try
set t to ""
set t to (read file f)
end try
return t
end lisIndex_xml
--=====
on compactIndex(nDoc)
local aliasNDoc
set aliasNDoc to nDoc as alias
write leTexte to aliasNDoc starting at 0
do shell script "gzip " & quoted form of POSIX path of aliasNDoc
end compactIndex
--=====
--[/SCRIPT](code}
Yvan KOENIG (from FRANCE samedi 14 mars 2009 20:55:42) -
How to remove all packages in a group except x, y, and z?
When I installed Arch, I installed KDE. Since then, I've switched to tiling WMs (Awesome, then DWM), and I really have no need of most of KDE any more. I still really like Dolphin, though. Is there a simple way to tell pacman to remove the kde group except for dolphin and its dependencies? (i.e., rather than just removing all of kde and reinstalling the few bits I want.)
Try
#!/bin/bash
groups="kde"
packages="kdebase-dolphin kdeutils-kcalc"
comm -23 <(comm -12 <(pacman -Sgq $groups|sort) <(pacman -Qq) | sort) <(for i in $packages; do pactree -u $i; done | sort)
<thisscriptname> | sudo pacman -Rns -
It allowed me to remove 344 of 396 packages I installed with 'pacman -S kde', both dolphin and kcalc seem to work (they at least start up ;P).
Of course you need to modify which group(s) you want to remove and which packages you want to keep, as well as pacman options - I'm fine with '-Rns' but you may prefer different ones. -
Remove all text/non-number characters
Odd question, but is there a way to remove all non-number characters from a column of cells? For example, if I have:
6dfasfads
12Randomletters.
Is there a way to get rid of the letters?
<Edited by Host>Here is a script doing the trick with no extraneous table or even column.
Barry's response is a clever one. I'm a bit bored to miss this track.
--[SCRIPT cleaner]
Enregistrer le script en tant que Script : cleaner.scpt
déplacer le fichier ainsi créé dans le dossier
<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
Sélectionner le groupe de cellules dont le contenu doit être nettoyé
Aller au menu Scripts , choisir Numbers puis choisir cleaner
Les cellules dont le contenu renferme des caractères non-numériques seront débarassées de ceux-ci.
--=====
L'aide du Finder explique:
L'Utilitaire AppleScript permet d'activer le Menu des scripts :
Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case "Afficher le menu des scripts dans la barre de menus".
--=====
Save the script as a Script: cleaner.scpt
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
Select the range of cells whose content must be cleaned.
Go to the Scripts Menu, choose Numbers, then choose "cleaner"
The cells whose content embed non numerical characters will drop them.
--=====
The Finder's Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the "Show Script Menu in menu bar" checkbox.
--=====
Yvan KOENIG (VALLAURIS, France)
2010/07/09
--=====
property alloweds : "0123456789.,-"
on run
set {dName, sname, tname, rname, rowNum1, colNum1, rowNum2, colNum2} to my getSelParams()
tell application "Numbers" to tell document dName to tell sheet sname to tell table tname
repeat with c from colNum1 to colNum2
tell column c
repeat with r from rowNum1 to rowNum2
set maybe to value of cell r
try
maybe * 1
on error (*
The cell doesn't contain a true number so it must be cleaned
set clean to {}
repeat with k in maybe
set k to k as text
if k is in alloweds then copy k to end of clean
end repeat
set value of cell r to my recolle(clean, "")
end try
end repeat -- r
end tell -- column c
end repeat -- c
end tell --Numbers
end run
--=====
set {rowNum1, colNum1, rowNum2, colNum2} to my getCellsAddresses(dname,s_name,t_name,arange)
on getCellsAddresses(d_Name, s_Name, t_Name, r_Name)
local two_Names, row_Num1, col_Num1, row_Num2, col_Num2
tell application "Numbers"
set d_Name to name of document d_Name (* useful if we passed a number *)
tell document d_Name
set s_Name to name of sheet s_Name (* useful if we passed a number *)
tell sheet s_Name
set t_Name to name of table t_Name (* useful if we passed a number *)
end tell -- sheet
end tell -- document
end tell -- Numbers
if r_Name contains ":" then
set two_Names to my decoupe(r_Name, ":")
set {row_Num1, col_Num1} to my decipher(d_Name, s_Name, t_Name, item 1 of two_Names)
if item 2 of two_Names = item 1 of two_Names then
set {row_Num2, col_Num2} to {row_Num1, col_Num1}
else
set {row_Num2, col_Num2} to my decipher(d_Name, s_Name, t_Name, item 2 of two_Names)
end if
else
set {row_Num1, col_Num1} to my decipher(d_Name, s_Name, t_Name, r_Name)
set {row_Num2, col_Num2} to {row_Num1, col_Num1}
end if -- r_Name contains…
return {row_Num1, col_Num1, row_Num2, col_Num2}
end getCellsAddresses
--=====
set { dName, sName, tName, rname, rowNum1, colNum1, rowNum2, colNum2} to my getSelParams()
on getSelParams()
local r_Name, t_Name, s_Name, d_Name
set {d_Name, s_Name, t_Name, r_Name} to my getSelection()
if r_Name is missing value then
if my parleAnglais() then
error "No selected cells"
else
error "Il n'y a pas de cellule sélectionnée !"
end if
end if
return {d_Name, s_Name, t_Name, r_Name} & my getCellsAddresses(d_Name, s_Name, t_Name, r_Name)
end getSelParams
--=====
set {rowNumber, columnNumber} to my decipher(docName,sheetName,tableName,cellRef)
apply to named row or named column !
on decipher(d, s, t, n)
tell application "Numbers" to tell document d to tell sheet s to tell table t to ¬
return {address of row of cell n, address of column of cell n}
end decipher
--=====
set { d_Name, s_Name, t_Name, r_Name} to my getSelection()
on getSelection()
local _, theRange, theTable, theSheet, theDoc, errMsg, errNum
tell application "Numbers" to tell document 1
repeat with i from 1 to the count of sheets
tell sheet i
set x to the count of tables
if x > 0 then
repeat with y from 1 to x
try
(selection range of table y) as text
on error errMsg number errNum
set {_, theRange, _, theTable, _, theSheet, _, theDoc} to my decoupe(errMsg, quote)
return {theDoc, theSheet, theTable, theRange}
end try
end repeat -- y
end if -- x>0
end tell -- sheet
end repeat -- i
end tell -- document
return {missing value, missing value, missing value, missing value}
end getSelection
--=====
on parleAnglais()
local z
try
tell application "Numbers" to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z is not "Annuler")
end parleAnglais
--=====
on decoupe(t, d)
local oTIDs, l
set oTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to d
set l to text items of t
set AppleScript's text item delimiters to oTIDs
return l
end decoupe
--=====
on recolle(l, d)
local oTIDs, l
set oTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to d
set t to l as text
set AppleScript's text item delimiters to oTIDs
return t
end recolle
--=====
--[/SCRIPT]
Yvan KOENIG (VALLAURIS, France) vendredi 9 juillet 2010 11:11:17 -
[SOLVED] Removing all uneeded packages, GNOME Issues
Just setup arch in VirtaulBox, and I got everything working! Hooray, only took 4 tries, but thats what I call the learning process and I love it!
My issue was this:
Gnome wouldn't save my theme settings! Each time I ran it with startx my theme settings were reset to default! I'd change the theme to DarkRoom and change my icon set to Tango, and then after logging out, and running startx again, poof, back to default. My background, however, DID save.
So after that experiment, I've decided to use KDE, just cause I wanna do it, no real reason, besides learning as much as I can
I've gone and removed gnome:
pacman -Rc gnome
Now I'm trying to clear out all the excess packages, so I ran:
pacman -Qdt
It shows a whole bunch of stuff, so what I'm asking is this: How can I clear out all unneeded packages, orphaned packages, etc
Coming from the Debian based world, I know I could use apt-get autoremove to get rid of unneeded packages, and I would like to know if there is a way to do this using pacman
If not, is it possible to run pacman -Qdt and export the output to a file, then run pacman -R and have it access that file and remove all those packages?
Thank you for the assistance!
Last edited by novafluxx (2009-10-24 21:20:44)Pierre wrote:1) You should have use pacman -Rcsn gnome
2) You can removed unneeded packages by pacman -Rcsn `pacman -Qqdt`
Thank you for the fast reply, I will try to remember that!
I've tried running what you suggested, but it doesn't seem to be working...
pacman -Rcsn 'pacman -Qqdt"
says its not found in the local db
Mefju wrote:Just use pacman -Rs $(pacman -Qqdt) as root
This will do it! I get it, make it use the string output of pacman -Qqdt as the input for pacman -Rcsn ?
Last edited by novafluxx (2009-10-24 21:10:42) -
APD - How to remove leading zero's in a String?
Hello All,
I have been stumped by this challenge for a few hours now, so would appreciate your suggestions.
I am using APD to produce a CSV file where the source is a query. The output requires 0MATERIAL and this is delivered by the source query. The issue is that the CSV file must not retain any leading zero's that may exist in the 0MATERIAL value.
e.g.
example # original material code desired output
========= ====================== ==============
a 000000000000015931 15931
b 000000000001001037 1001037
c 000000000008945420 8945420
d 000000000080889200 80889200
e 0000000000L0293500 L0293500
Initialy, I believed I could simply output the value of 0MATERIAL to an integer field. This would remove all leading zero's but not all 0MATERIAL codes are purely numeric in value (see example (e));
Someone had a similar requirement w/ SQL Server and solved it by replacing all zero's with a space, trimming leading spaces, then replacing remaining spaces back to zero's! [url]http://www.sql-server-helper.com/functions/trim-leading-zeros.aspx[url]
So the logic is something like this:
1. Replace each 0 with a space: REPLACE('0','',[0MATERIAL])
2. Use the L_TRIM string function to trim leading spaces: L_TRIM(<result from Step #1>)
3. Replace all spaces back to 0: REPLACE('','0',<result from Step #2>)
Formula Builder looks like this:
L_TRIM(REPLACE_ALL('0','',0MATERIAL))
I attempted this using the
REPLACE()
function (available in the APD Formula builder) to replace all zero's with an empty string. This too created a problem because as in examples (a) through to (e), the function replaces all zero's in the string not just the leading ones! e.g.
REPLACE('0', '',000000000001001037)
gives 1137 !
The problem here is that when you specify a space in the
REPLACE()
function by saying
it thinks you meant no spaces at all! Therefore I am no longer able to execute step 3!
I'm stumped now and would appreciate the communities help on this.
Thanks,Thanks Akshay,
I took 0MATERIAL as the source field
I specified ZMATLWOLDZERO as the target field (type same as 0MATERIAL).
In the code section i wrote this:
DATA: ls_source TYPE y_source_fields,
ls_target TYPE y_target_fields.
loop at it_source into ls_source.
move-corresponding ls_source to ls_target.
call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
output = ls_target-ZMATLWOLDZERO
IMPORTING
input = ls_source-material.
append ls_target to et_target.
endloop.
compiles fine but on test execution, the code termnates saying that "Incorrect parameter with CALL FUNCTION"
Forgive me this is a first attempt I have tried but I fear my logic is incorrect in the code somewhere...
Maybe you are looking for
-
Install instructions for Search Modeler and integrating with Apps 11i
Below are all the steps I took for creating integrating Search Modeler with an Oracle E-Business Suite 11.5.10.2 ATG RUP 7 instance called ERNIE. Much thanks to Oracle Support ( Rajesh Ghosh, Vikas Soolapani and Roger Ford), as this simply wouldn't h
-
6550b replacement screen 1600 x 900 not working.
I have a HP6550b and the original screen has broken. The original screen had a resolution of 1366 x 768. I read from the specifications that this laptop can also support a resolution of 1600 x 900. However, if I try a new screen with the 1600 x 900 r
-
Problem during Importing of FA master data
Hi, using SBO v8.8 PL:10, Importing FA Master data does not continue, w/ error number -2147467259. here is the error log.: 2011-01-04 16:00:45.678 0 BA ER CBFResourceLoader::GetChildNode <dbdataso
-
Sldieshow pforlem on Verizon hosted sites.
Revisiting a problem not reviewed since 2006 I wondered if anyone has found a workaround for the slideshow problem on verizon hosted websites. With earlier versions of iWeb it was found that the slide show did not work because the iWeb software had a
-
Ubd.exe - entry point not found
This error has persisted too long - if it is related to iTunes Apple should have fixed it by now! Every time the computer boots up this error shows: ubd.exe - entry point not found The procedure entry point_Block_object_assign coudl not be located in