I'm trying to parse BBcodes in php but i don't think my code is safe at all.
$Text = preg_replace("(\[color=(.+?)\](.+?)\[\/color\])is","<span style=\"color: $1\">$2</span>",$Text);
I think you can pass an injection like this and it will work:
[color=<script>alert('gotcha');</script>]
How to improve my regex to only capture the two standar color formats:
[color=red] OR [color=#FF0000]
Thanks
Hi, I created a TabControl in VS2005 and I bound two TabPages. I found I can change the TabPage BackColor property easily. but I can't change the TabControl BackColor as well.
How Can I Change the TabControl BackColor to match my TabPage BackColor?
Please See Screen Capture .
Thank you.
I am creating lists in my android app and would like to capture the text of the list item that is clicked but I want to do it in a seperate function so I only have to write the code once. And I want to be able to compare the string to another sting.
What is the best way to do this?
Hi folks!
I'm looking for a .NET image processing component or an open source alternative to automate the following tasks:
Photo capture (webcams and photo cameras)
Photo printing (grid/strip modes)
Applying photo effects
Saving photos
AtalaSoft DotImage is quite expensive, any other suggestions are welcome.
Thanks J
I am developing a firewall for Linux as my project. I am able to capture packets and to block them. I am using IPTABLES.
How can I use variables with sprintf instead of hardcoded values?
sprintf(comm, "iptables -A INPUT -s $str -j DROP")
// inplace of:
sprintf(comm, "iptables -A INPUT -s 192.168.0.43 -j DROP")
What is the best way to parse a float in CSharp?
I know about TryParse, but what I'm particularly wondering about is dots, commas etc.
I'm having problems with my website. On my dev server, the ',' is for decimals, the '.' for separator. On the prod server though, it is the other way round.
How can I best capture this?
I have an application which currently has an option to call phone numbers. Now by default it opens the Windows Phone dialler utility and tries to call the number.
I want it to instead make the call using skype, so what I was thinking was to create a c# application which would capture the callRequest and instead call skype.exe /callto:
Has anyone done anything like this before?
The ScrollViewer's MouseWheel event will fire only when the scrollbar is at the end of it's track (either the top or bottom/left or right). The MouseWheel event does not fire when it's anywhere in between.
Does anyone have any clue as to how to capture the scrolling when it's being caused by the mouse wheel?
I am using the following regex:
(public|private +)?function +([a-zA-Z_$][0-9a-zA-Z_$]*) *\\(([0-9a-zA-Z_$, ]*)\\) *{(.*)}
To match the following string:
public function messenger(text){
sendMsg(text);
}
private function sendMsg(text){
alert(text);
}
(There is no line breaks in the string, they are converted to whitespaces before the regex runs)
I wanted it to capture both functions, but it is capturing:
$1: ""
$2: "messenger"
$3: "text"
$4: " sendMsg(text); } private function sendMsg(text){ alert(text); "
By the way, I am using Javascript.
I need to capture particular windows of 3rd party process. I can find main window handle as Process.MainWindowHandle, but what I can use to list other windows?
I am using C# / .NET
I want to post a search value from index.php to search.php,
index.php
and search.php
or
I would like to retain 'val' value in the URL, but search.php could not capture the value of 'val' which appear to be "val=".
I want to post a search value from index.php to search.php,
index.php
<form action="search.php?val=" method="post">
and search.php
<?php echo $_GET['val']?>
or
<?php echo $_POST['val']?>
I would like to retain 'val' value in the URL, but search.php could not capture the value of 'val' which appear to be "val=".
I am using simple modal dialog by Eric Martin. And have defined a function e.g
function confirm(message, options) {....
}
To customize all confirm dialogs. Its working nicely accross all the browsers.Except when I enable Selenium IDE ,my custom confirm dialog function fails to capture "options" parameters and firefox console echos like this:
options is undefined callback=options.callback;
Error When Selenium IDE is visible
Normal Behaviour When Selenium IDE is closed
Please help me sort out this issue so I should able to run selenium tests.
I want to shutdown the UDC. It's very heavy for my pc. I already uncheck the "Enable Capture" checkbox but I have the feeling that it stay enable in the background. It constantly ask me the user and password of the proxy. I do not want an eclipse always trying to connect to internet and doing background procesing that I don't need.
So I have real time video stream. With 1 (one) person on It . It Is Black and White, I need to be able to capture this persons eyes and mouth (direction (at least X,Y), state (at least opened or closed) )
So Is there any fast library(s) for finding human eyes and mouth in Flash in such case? (pure Actionscript or Haxe\Java\C++\C port in SWC form...)
I know this is a simple question, but I haven't worked much with ActionScript...
I know how to create a text input field with Flash. I can create it on the stage and give it an instance name.
What is the code to capture the value of a text input field and display that value in a dynamic text field? How does this process differ between ActionScript 2.0 and 3.0?
I've got a task which can be only accomplished by construction a QUERY at runtime and executing it with sp_executesql. The result has to be a boolean (0/1 integer) value which I need to return as a result of the function.
The only way I found to capture an SP's output is "INSERT INTO [table] EXECUTE [sp]" query, but functions forbid this.
Any ideas how to overcome this?
I want to capture the responseXML that i have built in my jsp.
What should I do.
after that i will transform it in html.
I know this is annoying and we could do it with a framework or a library like jquery but i realize it with ajax.
Also i have problems with jquery and jsp\servlet since i must use a JSON SERVICE.
Why it seems to me that is so complicated.
I want to use Mercurial to capture changes made to the vanilla installation of a piece of software we use. Everytime we upgrade the software, we need to manually edit the various configuration files and add 3rd party libraries that we use in the current version of the software. Creating patches for the configuration files changes are fine, but how do I add 3rd party libraries (binaries) to a Mercurial patch? Is it even possible?
i have to send a file to a webserver via libcurl. so i send a HTTP POST form with the file and login credentials. it responds to me with some response (can be anything like HTML code or a SUCCESS or FAILURE string). i need to handle this in my code. can someone tell me how do i capture this response in libcurl.
i have to login webserver via libcurl. so i send a HTTP POST form with the login credentials. it responds to me with some response (a SUCCESS or FAILURE string). i need to handle this in my code. can someone tell me how do i capture this response in libcurl.
I have two customized cells in an iphone UITableViewController and would like to capture the data in one cell into another.....
I am currently unable to post images and pls assume the following points.
There are two custom UITableViewcells
1) Notes Textfield in one customcell
2) Submit button in another text field.
Now i want to pass data typed in the notes textfield to be available when I click the Submit button.... Is this possible? Please help....:(
I'd like to have a macro in Visual Studio 2005 that calls a DOS command and redirects the output (stdout and stderr) to a file. Just calling the command and "" redirecting it will not capture stderr, so there are two parts to this:
calling a DOS command
capturing both stderr and stdout to a file during that call
I'd then like to open this file in Visual Studio after the command completes.
I'm new to Visual Studio 2005 macro writing, and VB/VBA, so that's the kind of help that I'm looking for.
Thanks,
Mark