parameters

Twitter-like login system (passing parameters in URL?)

How do you pass parameters in a URL? I'm trying to design a login system similar to Twitter's. Notice how you can either login to the main page of www.twitter.com or you can go directly to customised pages such as www.twitter.com/lancearmstrong and www.twitter.com/rails . That's exactly what I need for my project. Thanks. ...

ParameterFieldCurrentValueException when data not saved with a report and exporting to PDF.

I have a report that I created with Crystal Reports 2008. This report uses upwards of 40 parameters to control the layout of the report. All the parameters are boolean and are defaulted to False in the saved report. The report is saved with the save data with the report option unchecked as I want to read the results from the database ...

SharePoint Web Part Parameters Mysteriously Disappearing

Ok I've got a weird one, I have a SharePoint WebPart in WSS 3.0 right now that's querying Yahoo Traffic's REST interface using VB.NET and the HttpWebRequest object. However I kept getting an error message from Yahoo that was saying I'm unauthorized, upon further examination, I noticed it's passing the following URL to yahoo: http://loca...

How to pass variable to SelectCommand of SqlDataSource?

I want to pass variable from the code behind to SelectCommand of SqlDataSource? I dont want to use built-in parameter types (like ControlParemeter, QueryStringParameter, etc) I need to pass a vraiable? the following example does not work <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionSt...

Passing an array of strings as parameter to a function in C

I want a simple function that receives a string and returns an array of strings after some parsing. So, this is my function signature: int parse(const char *foo, char **sep_foo, int *sep_foo_qty) { int i; char *token; ... strcpy(sep_foo[i], token); /* sf here */ ... } Then I call it like this: char sep_foo[MAX_QTY...

Adding a parameter to the URL with JavaScript

In a web application that makes use of AJAX calls, I need to submit a request but add a parameter to the end of the URL, for example: Original URL: http://server/myapp.php?id=10 Resulting URL: http://server/myapp.php?id=10&amp;enabled=true Looking for a JavaScript function which parses the URL looking at each parameter, the...

Difference between const declarations in C++

What is the difference between void func(const Class *myClass) and void func(Class *const myClass) See also: http://stackoverflow.com/questions/269882/c-const-question http://stackoverflow.com/questions/455518/how-many-and-which-are-the-uses-of-const-in-c and probably others... ...

PL/SQL (mod_plsql): Accept parameters only from POST, not GET requests?

Hi, I'm working on an application that uses mod_plsql with Oracle 10G to generate web pages via PL/SQL stored procedures called directly from the web browser. I'm looking for a way to only accept parameters via POST requests, and not GET requests. Ie, in PHP I would only want the value of $_POST['parameter_name'] and not $_GET['paramete...

How to pass an arbitrary number of parameters in C#

Hello everyone, OK I need to design a way to keep track of how many of each item exists. There are approximately 26 items. I also need a way to find out if a certain combination of items exist. For example, This is an engine for a card game. Each card has a different type and each card can have card attached to it. There need to be a ...

Passing pointer from java to native

Hi. Im making an inerface to a DLL library, so i can use it with Java. I need my native function to modify the value of a jlong parameter. Like the parameter was passed by reference. My Java method must have the exact parameters as the native function MPUSBWrite shown down here. Example of actual not working code: The MPUSBWrite gets it...

How can I pass a filename as a parameter into my module?

I have the following code in .py file: import re regex = re.compile( r"""ULLAT:\ (?P<ullat>-?[\d.]+).*? ULLON:\ (?P<ullon>-?[\d.]+).*? LRLAT:\ (?P<lrlat>-?[\d.]+)""", re.DOTALL|re.VERBOSE) I have the data in .txt file as a sequence: QUADNAME: rockport_colony_SD RESOLUTION: 10 ULLAT: 43.625 ULLON: -97.87527466 LRLAT: 43.5...

Strange behavior in constructor

Hi, I have a class made up of several fields, and I have several constructors. I also have a constructor that doesn't take any parameters, but when I try to use it: int main { A a; } The compiler generates an error, while if I use it like this: int main { A a(); } It's ok. What's that? Thank you ...

use decimal values as attribute params in c# ?

I have been trying to use decimal values as params for a field attribute but i get a compiler error. I found this blog post link saying it wasn't possible in .Net to use then, does anybody know why they choose this or how can I use decimal params? Thanks. ...

Passing multiple values for a single parameter in Reporting Services

I have several Multi-Select parameters in my report. I am trying to find a way to pass in multiple values for a single parameter in the web query string? If I pass in a single value, it works fine. The report runs fine selecting multiple choices for a single param. My trouble lies in the web query string. ...

Validating function arguments?

On a regular basis, I validate my function arguments: public static void Function(int i, string s) { Debug.Assert(i > 0); Debug.Assert(s != null); Debug.Assert(s.length > 0); } Of course the checks are "valid" in the context of the function. Is this common industry practice? What is common practice concerning function argumen...

Is there SQL parameter binding for arrays?

Is there a standard way to bind arrays (of scalars) in a SQL query? I want to bind into an IN clause, like so: SELECT * FROM junk WHERE junk.id IN (?); I happen to be using Perl::DBI which coerces parameters to scalars, so I end up with useless queries like: SELECT * FROM junk WHERE junk.id IN ('ARRAY(0xdeadbeef)'); Clarification: ...

When to use method overloads VS "request" object

What is the best "rule of thumb" to determine when to use method overloads and when to use a separate "request" class? for example: MakePancakes(int size) MakePancakes(int size, bool addBlueBerries) MakePancakes(int size, bool addBlueBerries, ...) As opposed to: MakePancakes(PancakeOptions options) Is it best to stick to one way o...

Is there a case where parameter validation may be considered redundant?

The first thing I do in a public method is to validate every single parameter before they get any chance to get used, passed around or referenced, and then throw an exception if any of them violate the contract. I've found this to be a very good practice as it lets you catch the offender the moment the infraction is committed but then, q...

Passing a method as a parameter in Ruby

I am trying to mess around a little bit with Ruby. Therefor I try to implement the algorithms (given in Python) from the book "Programming Collective Intelligence" Ruby. In chapter 8 the author passes a method a as parameter. This seems to work in Python but not in Ruby. I have here the method def gaussian(dist, sigma=10.0) foo end ...

php function for collating external variables into a single object regardless of GET or POST

Question: I recall reviewing someone else's PHP code once and he had a function or class method that rolled all GET and POST variables into a single plain old object that could then be passed around. If the same name-value pair appeared in both GET and POST, POST would win. Is there a well-coded PHP add-on out there of any sort that doe...