I've got some JavaScript in an ASP.NET page that looks like this:
var list = $get('<%=Topics.ClientID %>');
I have many functions written now where this syntax is used, and I would like to centralize my JavaScript and move this into an external JavaScript file. This breaks however, since 'Topics' cannot be found.
What is the best st...
Heya,
I have a script which I run and after it's run it has some information that I need to pass to the next script to run.
The Unix/DOS commands are like so:
perl -x -s param_send.pl
perl -x -s param_receive.pl
param_send.pl is:
# Send param
my $send_var = "This is a variable in param_send.pl...\n";
$ARGV[0] = $send_var;
print "Ar...
I have a pretty complex RewriteRule where I need to check if certain parameters are present in QueryString and then redirect to the same URL but with those parameters stripped.
How can I remove some parameters and preserve the rest?
RewriteCond %{QUERY_STRING} color=red
RewriteCond %{QUERY_STRING} status=contiue
RewriteRule ^(.*)$ /$1?...
I'm creating a (C#) program that downloads binaries using NZB files, there may only be one instance of my application running at any time.
So when a user doubleclicks an .nzb-file and my program is not running, it should start and process it (easy, file registration).
Now if my program is already running, I do NOT want to launch a secon...
In a similar way to using varargs in C or C++:
fn(a, b)
fn(a, b, c, d, ...)
...
Hello,
calling a stored procedure as
int pageNumber = 1;
int pageSize = 4;
SubSonic.StoredProcedure sp = SPs.UspListPlants(pageNumber, pageSize);
string result = sp.GetReader();
The sp work fine, but trying
foreach (SubSonic.StoredProcedure.Parameter param in sp.Parameters)
{
sb.Append("'" + param.Name + "' = ");
...
I'd like to have some hidden inputs on View A.aspx and pass the values to Controller. One of the values is a bool, and another one is a char.
How can I get those hidden input values in Controller?
...
I'd like to build a ParameterCollection object based on the results of either execute sp_columns MyTableName or SELECT * FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME = 'MyTableName'.
The problem I'm having is assigning the appropriate data type to each Parameter ... I'm unsure of how to gather that information from either of the abo...
It is common to have classes with methods with string parameters that must be validated agains null or empty, such as this example:
public class MyClass {
public void MyMethod(string param){
if(string.IsNullOrEmpty(param)){
throw new ArgumentNullException(...);
}
//...
}
}
It's clear that ...
Duplicate:
Is there a way to indicate the last n parameters in a batch file?
how to get batch file parameters from Nth position on?
Clarification: I knew of the looping approach - this worked even before Command Extensions; I was hoping for something fun and undocumented like %~*1 or whatever - just like those documented at http://w...
have an application written in Visual Basic, .NET 3.5 (VS2008)... and have reports created in Crystal Reports 2008 .... everything works fine... I pass the parameter values with code like this...
Dim SParams as new hashtable
SParams.add(paramname1,paramvalue1)
SParams.add(paramname2,paramvalue2)
SParams.add(paramname3,paramvalue3)
....
...
Hello, I'm with a problem, I have a ajax link that pass a parameter, but, the page that it opens does not need that parameter. The page only load 2 partial views, one of those need that parameter passed to the page to load the data correctly, and the other just need to load a form, so, don't need that parameter. How can i acheive this?
...
Hello Folks,
I'm using Routes for doing all the URL mapping job. Here's a typical route in my application:
map.routes('route', '/show/{title:[^/]+}', controller='generator', filter_=postprocess_title)
Quite often I have to strip some characters (like whitespace and underscore) from the {title} parameter. Currently there's one call pe...
Basically, I have something like the following:
public string SomeDBMethod(string server, string dbName, string userName, string password,...)
Is it good practice to refactor it to the following:
public string SomeDbMethod(DBParams parameters, ...)
Where DBParams is defined as follows:
public struct DBParams
{
string Server {get...
Hello,
I am working on a project which involves the ExtJS library and I came upon this piece of code which did not make sense (but it works). Please help :(.
TreePanel.on('click', showDocumentFromTree);
function showDocumentFromTree(node) {
if (TreePanel.getSelectionModel().isSelected(node)) {
dataStore.baseParams = {
...
I understand that if I pass a value-type (int, struct etc...) as a parameter (without the ref keyword), a copy of that variable is passed to the method, but if I use the ref keyword a reference to that variable is passed, not a new one.
But with reference-types, like classes, even without the ref keyword a reference is passed to the met...
I want to store configuration for a web project outside of the web project (ear/war file).
The application shouldn't know in which container it's running (WebSphere/JBoss etc.).
What is the best way to handle this?
Is JNDI a clean way? If JNDI can solve my problems, how should I configure it? (Custom Objects?)
In my case are there o...
It's pretty simple. There's a c++ function that uses ByRef parameters to return three variables at the same time.
STDMETHODIMP CReportManager::GetReportAccessRights(long lReportCode, VARIANT_BOOL *bShared, VARIANT_BOOL *bRunOnly, VARIANT_BOOL *bCopy)
However, the VBScript ASP code doesn't seem to pick up the new values for bShares, b...
Possible Duplicate:
Properties vs Methods
When is it best to use a property or a method?
I have a class which is a logger. When I create this class I pass in a file name.
My file name for the log is fairly simple, basically it just gets the application path and then combines it with myapp.log.
Now instead of having the log fi...
Some open source I've been using has the below line as a function declaration:
def parse_query(query=nil, options={}, models=nil)
What effect do the "equals" symbols have on the statement? Does it just make the parameters optional?
...