I have many params making up an insert form for example:
x.Parameters.AddWithValue("@city", City.Text)
I had a failed xss attack on the site this morning, so I am trying to beef up security measures anyway....
Should I be adding my input params like this?
x.Parameters.AddWithValue("@city", HttpUtility.HtmlEncode(City.Text))
Is there anything else I should consider to avoid attacks?
Thanks
HI,
suppose i have one input box which takes value for mobile no. and when the user wants to add another mobile no at that time user will click 'plus' button. as soon as he clicks the plus button another text box should appear and user should allow to enter another mobile number
i want code in JSF richfaces please help me out.
Thanks in advance
Jungle_Hacker
I can't find anything like that. Commercial or free ( XSQL Lite is suitable for my case and ) tools show diffs in grids with possibility to export to CSV. Also they generate sync SQL scripts when run from command line. What I need is an output as a comprehensive report ( XML , HTML ) suitable for parsing so that I would be able to show similar diff grid in my application ( updated old/new values for each column , added - all values for row , deleted - all values for row and etc... ) .
Dear All:
I am using TestNG+ReportNG per wiki instructions in gradle (I fixed on cookbook as default example did not work form me).
http://docs.codehaus.org/display/GRADLE/Cookbook#Cookbook-addreporters
I would like to somehow capture console output in TestNG. Is this possible?
Thank you
Misha
Hello,
To illustrate my problem,
TEST="Hi my name is John"
OUTP=`echo $TEST | awk '{print $3}'`
echo $OUTP
What I would expect this to do is pass the $TEST variable into awk and store the 3rd word into $OUTP.
Instead I get "Hi: not found", as if it is expecting the input to be a file. If I pass just a string instead of a variable, however, there is no problem. What would be the best way to approach this?
Thanks all!
Hi, I am running a plugin called Category Posts Widget for WordPress: http://wordpress.org/extend/plugins/category-posts/
It uses a while loop to display the names of all posts in a certain category. I want to get it so that there is a different class attached to the li tag on every second output.
Here is the block of code for the plugin:
// Post list
echo "<ul>\n";
while ( $cat_posts->have_posts() )
{
$cat_posts->the_post();
?>
<li class="cat-post-item">
<a class="post-title" href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
<?php
if (
function_exists('the_post_thumbnail') &&
current_theme_supports("post-thumbnails") &&
$instance["thumb"] &&
has_post_thumbnail()
) :
?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail( 'cat_post_thumb_size'.$this->id ); ?>
</a>
<?php endif; ?>
<?php if ( $instance['date'] ) : ?>
<p class="post-date"><?php the_time("j M Y"); ?></p>
<?php endif; ?>
<?php if ( $instance['excerpt'] ) : ?>
<?php the_excerpt(); ?>
<?php endif; ?>
<?php if ( $instance['comment_num'] ) : ?>
<p class="comment-num">(<?php comments_number(); ?>)</p>
<?php endif; ?>
</li>
<?php
}
echo "</ul>\n";
I am just trying to get it so on each second one in the output list, the li has a different class, so cat-post-item-alt for example.
Thanks,
Wade
I'm trying to output the title of a taxonomy page when viewing it...
So like, if i was on a 'tag' page i would go:
<?php if (is_tag()) {?>
<h1><?php single_cat_title(); ?></h1>
<?php } ?>
But how would i achieve the same thing for if the user is viewing a specific taxonomy page?
is_taxonomy() doesn't exist so i'm suck! :/
Hi,
I have a hashmap with some information(key and value) in a perl file. I want to display them in HTML output and each displayed (key, value) will link to something. When I click the link then there will be some information there.
Anyone suggests me how can I do that. Is this similar to creating a CGI file and use CGI.pm? I will update more detail on this question later.
Our application needs to use two different kinds of databases.One is oracle, the other is mysql and we want to use maven plugin hbm2ddl to generate the ddl file, and want to output the two ddl files at the same time, I don't know how to set the configuration in pom.xml. I tried to use this plugin twice, but it always generated one ddl file. Any one encountered such case before ? could u please give some advice.
Is there a way in Android to force output through the phone speaker, even if a headphone is plugged into the jack? I know there has to be a way because when you are talking on the phone, you can put someone on speaker phone, even if there is headphones plugged into the jack.
Assume I have the following input in Pig:
some
And I would like to convert that into:
s
so
som
some
I've not (yet) found a way to iterate over a chararray in pig latin. I have found the TOKENIZE function but that splits on word boundries.
So can "pig latin" do this or is this something that requires a Java class to do that?
I am successfully getting Fluent NHibernate to update my database by calling UpdateBaseFiles:
Public Sub UpdateBaseFiles()
Dim db As SQLiteConfiguration
db = SQLiteConfiguration.Standard.UsingFile(BASE_DBNAME)
Fluently.Configure() _
.Database(db) _
.Mappings(Function(m) m.FluentMappings.AddFromAssemblyOf(Of FluentMap)()) _
.ExposeConfiguration(AddressOf UpdateSchema) _
.BuildConfiguration()
End Sub
Private Sub UpdateSchema(ByVal Config As Configuration)
Dim SchemaUpdater As New SchemaUpdate(Config)
SchemaUpdater.Execute(True, True)
End Sub
How do I output the DDL to a file, I do this when initially creating the schema by using:
Private Sub BuildSchema(ByVal Config As Configuration)
Dim SchemaExporter As New SchemaExport(Config)
SchemaExporter.SetOutputFile("schema.sql")
SchemaExporter.Create(False, True)
End Sub
but SchemaUpdate does not have a SetOutputFile method.
Does anyone know the reasoning behind the strict doctype not allowing input elements to be direct descendents of a form element. I find it annoying that i have to wrap a submit button which is a block level element inside another block level element say a fieldset or a div. However, I cannot find an answer anywhere as to why this actually is.
I am writing a forum in Python. I want to strip input containing the right-to-left mark and things like that. Suggestions? Possibly a regular expression?
I've got a basic PyQt QFileDialog file browser goin in Python, Kubuntu.
My issue is I would like the "tab key" in the file input to act as tab-complete does in a shell.
Is there any way to accomplish this?
Hi, everybody. I invoked shell command by Process class of java and it gave "stty: standard input: Invalid argument" no matter the command is right or wrong (normal output of shell command is shown too). If I run the shell command in shell, no such error message shows. I can't figure out why.
Thanks
$(function(){
$.ajax({
url:'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=user_name&callback=?',
//dataType:'json',
success:function(data){$('body').append('the data is' +data);}
});
});
the above code with dataType line prints out [objects] while with the dataType line commented it prints out nothing ...how can i get it to print the json output from the server rather then the javascript object?
I have an IF statement. If a cell = n, then do something, else output NULL
=IF(A1=5, "Success", NULL) // #NAME?
=IF(A1=5, "Success", "NULL") // NULL (as in text, not actually NULL!)
=IF(A1=5, "Success", "") // blank but not NULL
=IF(A1=5, "Success", 0) // zero value but not NULL
This is a 2 part question:
1)
click on one of the demo dropdowns on this page. when you tab over to the next input, the text is selected/highlighted in firefox. how can i prevent this from happening?
2) bonus: can you review my code that is hosted on google and tell me what i can improve?
Here is the function description
test($argv)
$argv is an array, for example $argv=array($from1,$to1,$from2,$to2.....);
array items must be even.
$argv=array(1,2,4,5) : this will output values like below:
1_4
1_5
2_4
2_5
The number of array $argv's is not constant.
Maybe 3 or 4 levels of loop will be outputed.
I know this will used RECURSIVE , but i don't know exactly how to code.
In my models I often use text fields that are intended to contain large pieces of textile-formatted input. I'd like to automatically obfuscate any email addresses that are entered into these text fields, so that when they're printed in a template they're not visible to spiders.
Is there a smart way to do this?
I have started to look into Hadoop. If my understanding is right i could process a very big file and it would get split over different nodes, however if the file is compressed then the file could not be split and wold need to be processed by a single node (effectively destroying the advantage of running a mapreduce ver a cluster of parallel machines).
My question is, assuming the above is correct, is it possible to split a large file manually in fixed-size chunks, or daily chunks, compress them and then pass a list of compressed input files to perform a mapreduce?