Hi,
In one of the ms-access table I work with we have a text field with a set size.
At the end of this field there is some extra code that varies depending on the situation.
I'm looking for a way to remove one of these code but even when the last part is truncated by the field maximum size.
Let's call the field "field" and the code I'm...
I have two tables...
groupid membership_list managerid
-------------------------------------
0 /0//1//2/ 2
1 /2/ 2
userid username
------------------
0 ben
1 tom
2 dan
I'd like to display a table to for example the user 'ben' that is a list of the groups they are a ...
I have a large XML, looking like this:
<gender>M</gender>
<last-name>*</last-name>
<profession>2165dda2-dc59-41af-acb5-06d8914c4841</profession>
<first-name>*</first-name>
<mail-confirmation>1</mail-confirmation>
<fax-confirmation>1</fax-confirmation>
I only want to keep the tags. I found a way to search IN the tag, like this:
<prof...
How can I replace all line-endings in big file (>100MB)?
I have tried to do
:%s/\n/, /g
but it's too slow.
...
In the DOM I am loading a static Google Map image.
When the document is ready with jQuery sometimes I need to replace that image with a bigger version.
Problem is that in IE the CPU goes whooooooo because IE is still looking to load the initial image with no success.
Is there a way to cancel or clear the previous load?
EDIT: I should no...
I want to implement a progress bar showing elapsed seconds in bash. For this, i need to erase the last line shown on the screen ( command "clear" erases all the screen, i need to erase only the line of the progress bar and replace it with the new informations ).
Final result should look like :
"Elapsed time 5 seconds"
...
Hi,
I want to replace all the occurances of a period '.' in a JavaScript string
For example, I have
var mystring = 'okay.this.is.a.string';
I want to get -> okay this is a string
so far I tried
mystring.replace(/./g,' ')
but this ends up with all the string replaced to spaces. Any idea how to resolve this?
...
Hey,
I'm trying to replace parts of a Val() in jquery with some text but am not sure how to do this. $(this).val() returns "# number of...." - I would like to replace # with custom text, but Val doesn't seem to have a replace() function. I'm quite new to JQuery, so I might be missing something obvious.
Thanks for any help
...
Hey,
I need a regular expression to solve the following problem (links to similar problems is also appreciated, related tutorials etc.):
"__some_words_a_b___" => "__some words a b___"
"____" => "____"
"some___words" => "some words"
So I want underscores between words to be replaced with space and keep leading and trailing underscor...
Hi everyone,
I've been struggling on this thing for a week without being able to find what I'm looking for.
Here is what I'd like to do:
I'm setting up a wiki where I can post all my knowledge to (yes, I know a couple things :p) but I can't render it the way I'd like to.
The bodies of my posts are text fields. In order to render them t...
I'm working on a simple search engine for a newspaper application. When the user types a keyword, a results page is shown, highlighting the term with a color.
I'm currently doing this:
$title = str_ireplace($term, "<span class='highlight'>$term</span>", $note->Title);
Great, str_ireplace() makes the case-insensitive search, but when ...
Hi friends,
I need some comparing and replacing code in PHP
Our mission is to empower consumers to
Praise Good Service when they receive
it and to Report Poor Service wherever
they have to endure it.
I need this paragraph to xcompare for some words (for example mission, Good ) and replace that word like this m***n and G**d
...
How can I replace a string containing a lot of ?myuser=12122 ?myuser=5457 ... with empty string so that it doesn't show ?myuser=number inside the string?
I think I should use regex?
...
As the title states, I need to relace all occurrences of the $ sign in a string variable with an underscore.
I have tried:
str.replace(new RegExp('$', 'g'), '_');
But this doesn't work for me and nothing gets replaced.
...
I need to convert a string of text containing a long url into the same string but with a tinyurl (using the tinyurl api). eg. convert "blah blah blah /http://example.com/news/sport blah blah blah" into "blah blah blah http://tinyurl.com/yaeocnv blah blah blah".
How can it be done? PLEASE NOTE I added a slash before the long url as I'm o...
Hey,
I want to convert the following SQL Query to a SubSonic Query.
SELECT [dbo].[tbl_Agency].[ParentCompanyID]
FROM [dbo].[tbl_Agency]
WHERE REPLACE(PhoneNumber, ' ', '') LIKE REPLACE('%9481 1111%', ' ', '')
I thought I would do it like below, but I just can't get it to produce valid SQL.
//SubSonic
string agencyPhone...
How can I replace CHAR with VARCHAR2 in all tables in a schema?
Note: I'm content with a query that returns the ALTER TABLE statements so I can save the script and run it again.
...
Someone tried to recreate smarty in js:
// actually from a template file, not hardcoded in the javascript
html = '<span class="{test}">yay</span>';
html = change(html, 'test', 'foo bar');
function change(html, key, value){
html = html.replace('{'+key+'}',value);
html = html.replace('%7B'+key+'%7D',value);
return html;
}
...
I'm trying to make a dynamic regex that matches a person's name. It works without problems on most names, until I ran into accented characters at the end of the name.
Example: Some Fancy Namé
The regex I've used so far is:
/\b(Fancy Namé|Namé)\b/i
Used like this:
"Goal: Some Fancy Namé. Awesome.".replace(/\b(Fancy Namé|Namé)\b/i, '...
how can i replace the double quote in vb.net?
it doesn't work this code
name.Replace("""," ")
...