I'm working on rewriting a C program in C++ to take advantage of OO aspects so it can easily support multiple devices, and one part of the program is an expression evaluator. Expressions can have function calls, and here's the structure for functions.
typedef struct {
char *name;
int argc;
void (*func) ();
} FUNCTION;
Some...
I'm using Apache rewrite_mod to have all test after the URL adress go into parameter text using the following in the .htaccess file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?text=$1 [L,QSA]
which works if I have www.example.com/some_text
but doesn't when I have www.example.com...
I have asked here how to make the https post, and now that works fine. Problem now is How to send a parameter, name query, wich is a json string:
{"key1":"value1", "key2":{"key21":"val21"} }
What I'm doing and doesn't work is:
HttpWebRequest q = (HttpWebRequest)WebRequest.Create(Host + ":" + Port);
ServicePointManager.ServerCertificat...
Hello,
If I write this line in Java:
JOptionPane.showInputDialog(null, "Write something");
Which method will be called?
showInputDialog(Component parent, Object message)
showInputDialog(Object message, Object initialSelectionValue)
I can test it. But in other cases similar to this, I want to know what happens.
Martijn
...
I need to offer the opportunity to install a personalized Adobe Air application from a website. Every user should be able to download an individual version of the app out of their user profile. Therefore i need to pass an id (e.g. the user id) to the installer which should be available at the first startup of the app, so that i can store...
I need to create a pretty route for an action that is expecting ugly nested parameter names (this is set and not something I can change at this time).
So instead of
http://domain.com/programs/search?program[type]=leader&program[leader_id]=12345
I want
http://domain.com/programs/search/leader/12345
The problem is that Rails rou...
I have a form that displays differently depending on the parameter it was called with.
Ex.
testsite.local/users/new?type=client
So if type was a or b, the form would display different fields.
My problem is when the form is filled out incorrectly, because if the user couldn't be saved corrently, it renders the form with the default e...
I'm writing a library to humanize bytes in Ruby (e.g. to turn the byte count 1025 into the string 1.1K), and I'm stuck on one element of the design.
The plan is to extend Numeric with ahumanize method that returns a human-friendly string when called on a number. After looking at the source of Number::Bytes::Human (a Perl module that I ...
Here's the setup:
I have an algorithm that can succeed or fail.
I want it to succeed with highest probability possible.
Probability of success depends on some parameters (and some external circumstances):
struct Parameters {
float param1;
float param2;
float param3;
float param4;
// ...
};
bool RunAlgorithm (const Parameters...
Hi,
I have report data that belongs to regions in a tree (with infinite levels).
What I would want is to allow the user to choose a region (node in the tree), and pass that parameter on to my stored procedure, which will collect appropriate data.
I have created some reports with drill-down matrices, which sort of does what I want. I ne...
Hi there.
Here's a small snippet of code, when called it outputs 'double'. Why? What's the reasoning behind this. Why doesn't it print 'float'?
class source
{
static void Main()
{
Receiver r = new Receiver();
r.Method1(1.1);
}
}
class Receiver
{
public virtual void Method1(double f) { Debug.Print("d...
[Original title referred to 'sizeof function'.]
I tried these and they all worked:
char *p;
printf("Size of *p is %d\n",sizeof(*p)); //result =1
printf("Size of p is %d\n",sizeof( p)); //result =4
printf("Size of p is %d\n",sizeof( //result =4
I wonder why the first printf is 1, the 2nd and 3rd is 4?
So what arguments can size...
Hi, when the "preview" link is clicked it is meant to change the video script and video swf using the innerHTML method, however in IE 7+ the flash seems to appear but never loads the video i.e. it just stays white.
<script>
function changeVideo(filename,script) {document.getElementById('video').innerHTML =
'<object classid="clsid:D27CDB...
Is it possible to build a VBscript parametrized query without knowing the names, types or number of arguments beforehand?
I'm trying to do this:
set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = cn
cmd.commandText = proc
cmd.commandType = 4
cmd.Parameters.Refresh
For i = 0 To UBound(params)...
DROP TABLE IF EXISTS `actividades`.`act_actividad_audit`;
CREATE TABLE `actividades`.`act_actividad_audit` (
`fe_creacion` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
`usr_digitador` char(10) NOT NULL,
`ip_digitador` char(15) NOT NULL,
`id_act_actividad` int(10) u...
Hi, I am binding my command like:
<Button Command="{Binding NextCommand}"
CommandParameter="Hello"
Content="Next" />
Here, I also bind its CommandParameter property, now how to fetch its value from NextCommand.
public ICommand NextCommand
{
get
{
if (_nextCommand == null)
{
...
I'm trying to make a Crystal Reports 11 report off an Oracle database that's grouped by user. I've got over one thousand users. I want to create a parameter field that prompts the person to select which users they would like to view the results for. However my parameter selection field is only showing 221 of the possible users. The u...
Hi,
A large part of our user base accesses corporate data by building ODBC queries inside Excel 2003 using Microsoft Query. For the more complex stuff they often get me involved.
There have been a number of occasions whereby I've decided that the most logical way to extract certain data would be to use an Inline Table-Valued Function ...
I want to start a program using Delphi code, and "command" it to perform an action, in this case a button click.
I know you can start a program using the command line, but I would need the right paramaters for the button click. How or where can I find it?
...
So I've had a simple ucwords function for Perl which I've had a while, and wanted to expand it, this is what I've come up with, is this the way I should be building my functions to handle optional parameters?
Original:
sub ucwords{
$str = @_[0];
$str = lc($str);
$str =~ s/\b(\w)/\u$1/g;
return $str;
}
Extended:
sub u...