95 Topics

Member Avatar for
Member Avatar for themathprof

I'm coding in VB6. I have pictures in Picture1 and Picture2. I would like to replace the picture in Picture1 with the picture in Picture2. What code will get this done? Thanks.

Member Avatar for Santanu.Das
0
2K
Member Avatar for joshl_1995

Hello Daniweb Community, I was wondering if there is a way to replace words from a listbox. So at the moment I've got a listbox with a couple of strings to be replaced in the textbox, however single line listbox items work but when I add a multi-lined item eg. …

Member Avatar for joshl_1995
0
324
Member Avatar for Tinnin

Hi All, I'm trying to remove the <head> tag and contents from some html but I'm having no luck. The <head> portion of the html is: <head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style><![endif]--><title>Resume (Origin design)</title><style><!-- /* Font Definitions …

Member Avatar for diafol
0
255
Member Avatar for grakovski

Hello there, I got forum (phpbb3) and i have topics with a lot of links, like this: <a href="link..." class="postlink">Link name...</a> in every link i have class="postlink" and i want to add rel="nofollow" for every external link except my domain by check the 'href' definition. Its possible with only preg_replace …

Member Avatar for grakovski
0
426
Member Avatar for grakovski

Hello! I have some i like this: `<i class="pcon" style="background-image: url(./styles/SkyBoot/imageset/topic_unread.gif); background-repeat: no-repeat;">` I want to change only this: `styles/SkyBoot/imageset` to this: `styles/SkyBoot/imageset/black` Because i have cookies and i want to create second template. I want this to change images for my black template (second theme) I try with: `jQuery('.pcon').each(function(e) …

Member Avatar for grakovski
0
399
Member Avatar for valestrom

My program is supposed to replace all sets of 4 spaces with a tab but it only seems to be editing the first line then skipping the rest of the lines. "work_string" is defined via another function which takes and saves an entire files input into one string. I just …

Member Avatar for valestrom
0
313
Member Avatar for valestrom

Hey, I'm trying to figure out how to get this kind of program to work, it's supposed to be a UNIX style program in the sense that everything is command line driven. What I'm trying to get it to do is when the function is called it takes the input …

Member Avatar for Gribouillis
0
5K
Member Avatar for userasad

I have a text file and i want to replace a word from a specific location. For example want to replace 5th word from 12th line of file. How i can do that?

Member Avatar for Rizwanrana786
0
255
Member Avatar for nouth

how to `.replace()` the `'error'`? only use `a` and `b` var str = 'bla bla anything error anything bla bla'; var a = 'anything', b = a; im not good with regular expressions so im asking for how to do this with variables so i can set them up all …

Member Avatar for diafol
0
6K
Member Avatar for Szabi Zsoldos

Hey guys, I am having some difficulties regarding a select query logic. Then I have a table with products and it has a column -> submodel with all kind of data in it. ![3bcf9a8dac9e8218c88209198e26a7e5](/attachments/small/2/3bcf9a8dac9e8218c88209198e26a7e5.png "align-left") What I want to achieve is to **STRIP** (with REGEXP?) all the strings starting with …

Member Avatar for Szabi Zsoldos
0
726
Member Avatar for lonrat

Does anyone know of an easy way to have an image switch to another image when the cursor hovers over a completely separate image? [Here](http://lonnyfoster.com/temp/daniweb/replace_image.png) is a diagram that hopefully illustrates more clearly what I'm trying to say.

Member Avatar for Reshma_1
0
300
Member Avatar for laurel.pehrson

I am trying to use the dynamic page master tutorial from CSS-Tricks.Com. My website is meant to be a one page website. Portfolio and the Services are meant to load dynamic content. When you click on a description link on the portfolio item a larger description that goes above it …

Member Avatar for iamthwee
0
176
Member Avatar for RLS0812

I am attempting to use preg_replace to purge everything except letters and numbers in the $_POST, however is seems to be failing to work. Sample code below demonstrating the problem. <html> <?php if( isset($_POST["name"]) || isset($_POST["age"]) ) { $x1 = preg_replace('[^A-Za-z0-9]', "", $_POST['name'] ); $x2 = preg_replace('[^A-Za-z0-9]', "", $_POST['age'] ); …

Member Avatar for RLS0812
0
227
Member Avatar for 06njack

Hello all, I've been set a lab assignment and am really struggling to get to grips with it. The aim to to create a "grass-roots" program that doesn't make heavy use of built in functions. Namely "string.replace()" in this case! Any ideas as to why the below code doesn't work? …

Member Avatar for woooee
0
268
Member Avatar for MidiMagic

I want to copy a folder full of folders to a backup on another disk. But if a duplicate filename already exists on the other disk, I want Windows to prompt to ask whether or not to replace the file for each file separately. Windows XP just gives me the …

Member Avatar for gerbil
0
442
Member Avatar for blueguy777

$a = array(000,400,000,500); $b = array(300,400,450,500); $i=0; foreach($b as $k=>$v) { if($v==$a[$i]) { $b[$k]='000'; } $i++; } print_r($b); i want same thing in two dimensional array $a = Array ( [0] => Array ( [0] => 000000 [1] => 000400 [2] => 000450 ) [1] => Array ( [0] => …

Member Avatar for blueguy777
0
325
Member Avatar for blueguy777

Array1 = array(000,400,000,500) Array2 = array(300,400,450,500) if the values of Array1 matches with Array2 values then the matching values of Array2 should be replaced with 000 i.e. Array2 = array(300,000,450,000) somebody help me. thanks in advance

Member Avatar for blueguy777
0
237
Member Avatar for mario90

hello i have this little image script that work on greasamonkey, the script is good and work like a charm it help me to block images i dont want to see but i wished it has interval timer becasue i run it over site with dynamic content ..the targeted pics …

Member Avatar for mario90
0
207
Member Avatar for Angelrawzz

Hi, I am trying to create a function which takes two chars and a char* string. Then run the function and replace each occurence of Char1 with char 2. E.g. String = Apples. Char 1 = A. Char 2 = B. Char 1 is present in string so replace all …

Member Avatar for deceptikon
0
601
Member Avatar for Jahliah

Is it possible to replace commas and spaces with commas in c#? I'm fresh in c# and am looking for guidance. Any help is appreciated! **Before:** Deleting 11 files.ABC: Total Time = 01:16:30, Remaining Time = 00:00:00 **After:** Deleting,11,files,ABC: Total,Time,01:16:30,Remaining,Time,00:00:00

Member Avatar for Ketsuekiame
0
4K
Member Avatar for mpc123

Hi I have an issue where by I have lots of products in a field which are comma delimited I want to replace those product words with a id number that I have in a different table. I currently use FIND INSET to replace a tab to the comma but …

Member Avatar for mpc123
0
211
Member Avatar for nouth

So I have a string of the English alphabet for example. But I don't know the alphabet very well but I do know that it starts with "abc" and that it ends in "xyz". I want to remove letters "b" to "x". I want to do something like `str = …

Member Avatar for nouth
0
2K
Member Avatar for fashxfreak

Hi ! I have a column of 'City', now I want to compare the value of each cell of 'City' against the column 'City_Check'; the cell where the value matches, pick the value of 'City_ID' column & replace the city name with that ID in the 'City column'. * The …

Member Avatar for urtrivedi
0
257
Member Avatar for designershiv

I have a requirement to remove the use of tables and replace the code with HTML lists (<ul> and <li>). The HTML code to be replaced is as below <table> <tr><td>John Smith</td></tr> <tr><td>24 years</td></tr> <tr><td>Chicago</td></tr> </table> How to replace the above code with (<ul> <li>)

Member Avatar for designershiv
0
343
Member Avatar for ivanichi

Assuming i have $a='1024,1025,0000|1020,0000|'; $b='1024,1025,0000,1020,0000,'; i want replace commas (,) in $b with (|) so that $b is equal to $a like this $b='1024,1025,0000|1020,0000|'; if i use $ob=str_replace("0000,","0000|",$b); echo $ob; output works : 1024,1025,0000|1020,0000| But, how to make it with PHP where did i put that this refers to the …

Member Avatar for ivanichi
0
253
Member Avatar for ppstyle

I have a replace button which has to replace a word that is searched inside the richtextbox(rtb).But the code is not working, help me identify my mistake. Thank you If HTMLopt.rtb.SelectedText.Length <> 0 Then HTMLopt.rtb.SelectedText = txtReplacementText.Text End If Dim StartPosition As Integer = HTMLopt.rtb.SelectionStart + 2 Dim SearchType As …

Member Avatar for G_Waddell
0
192
Member Avatar for debasishgang7

Hi, I am trying to write a python func. which can replace nth occurance of any substring present in any string. For example: main_string = "badZZZZZZZZZZZZZZZZZZbadZZZZZZZZZZZZZZZZZZZZzbadZZZZZZZZZZZZZZZZZ" If I wanna replace the 2nd occurance of string "bad" with 'good' i will pass customreplace(main_string,'bad','good',2) So the Function should return badZZZZZZZZZZZZZZZZZZgoodZZZZZZZZZZZZZZZZZZZZzbadZZZZZZZZZZZZZZZZZ I have …

Member Avatar for bumsfeld
0
6K
Member Avatar for Echo89
Member Avatar for Echo89
-1
2K
Member Avatar for JySysAdmin

I am looking at http://www.w3schools.com/jsref/jsref_replace.asp and the specific example at: http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_replace3 var str="Mr Blue has a blue house and a blue car"; var n=str.replace(/blue/gi, "red"); And the result of N would be: Mr red has a red house and a red car I want the result to be: Mr Red …

Member Avatar for pritaeas
0
233
Member Avatar for magicmarkuk

Hi I have a site built on Wordpress which has a over 4,000 posts all with the suffix -2 at the end of the post name (due to me forgetting to clear the trash) before running an import). I would like to remove the -2 from the post names with …

Member Avatar for magicmarkuk
0
278

The End.