Member Avatar

I have a string contains sequences of 0 and 1. I need to replace all zero sequences whose length less than 5, into number 1 with same length. The zero sequences with length 5 or more should be left as is. For example source : 11000001100010011000001 result : 11000001111111111000001 [CODE] <?php $string = '11111000011100000110010'; $pattern = '/0{1,4}/i'; $replacement = '1'; // what should I put here? echo preg_replace($pattern, $replacement, $string); ?> [/CODE] Thanks

Member Avatar
0
5
Member Avatar

Hello everybody, I need to load an external movie clip using loadMovie(). This external movie clip is playing some sound by default. I need to stop sound for that movie clip only, but not for my entire movie. I don't have the .fla file for that external movie, and fail to disassemble it. Does anyone has a solution? Thanks

Member Avatar
0
2
Member Avatar

i've created a form like this [code=html] <form method="post" target="iframe_in_bottom" action="send.php"> [/code] send.php is used to save data posted from the form, and call a function called getURL in main window [code=html] <script type='text/javascript'>parent.getURL('thankyou.php')</script> [/code] [code=javascript] function getURL(url){ var xmlHttp=GetXmlHttpObject(); function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ document.getElementById('maindiv').innerHTML=xmlHttp.responseText; } else { document.getElementById('maindiv').innerHTML = document.getElementById("divloading").innerHTML } } xmlHttp.onreadystatechange=stateChanged ; xmlHttp.open("GET",url,true); xmlHttp.send(null); } [/code] if getURL called from send.php using above syntax, the xmlHttp.readyState value is never reach something after 1 and getURL never finished. Please note that this problem happened only if getURL is called from inside iframe, and using Opera. …

0
1
Member Avatar

I want to paste some text in clipboard into Ms Word. I wrote this following code [code] a:=findWIndow(pchar('OpusApp'),nil); b:=FindWindowEx(a,0,pchar('_WwF'),nil); c:=FindWindowEx(b,0,pchar('_WwB'),nil); d:=FindWindowEx(c,0,pchar('_WwG'),nil); SendMessage(d,wm_paste,0,0); [/code] and it didn't work. But i wrote the code below to paste into Wordpad,and it works fine [code] a:=findwindow(pchar('WordPadClass'),nil); b:=FindWindowEx(a,0,pchar('RICHEDIT50W'),nil); SendMessage(b,wm_paste,0,0); [/code] Am I made some mistake in Ms Words' window structure? The structure above is what i got using Winspector.I'm currently using Ms Word 2007. Does anyone have solution? Thanks

Member Avatar
0
3

The End.