parameters

c++: ifstream open problem with passing a string for text file name

hi guys, i'm trying to pass a string from main to another function. this string is a name of text file that needs to be oepened. as far as i can see, i am passing the string alright, but when i try to use ifstream.open(textFileName), it doesn't quite work. but when i manually hardcode it as ifstream.open("foo.txt"), it works just fine. i...

passing url parameters to iframe, using jquery or javascript

After searching a lot over the internet I finally decided to post this question. I am using THICKBOX jquery tabs.When any of the tab is clicked I want to pass the URL.IDNUMBER to the iframe which on tab pages . I was able to send the IDNUMBER and display it in a text box by simply using jquery on the main page $("#mytest").val('IDNUMB...

Difference between arguments/parameters in C#

What is the difference between an argument & a parameter in C#? Are they the same thing? ...

APPLET tag missing CODE parameter - not really?

Hello all, I am trying to implement this demo on my local machine. http://bit.ly/4g4o1r I have placed these 3 files in a folder: LittleShootApplet.class appletLoader.js filepath.html I have pointed my browser to that location but I keep getting applet missing code parameter even though it does?! APPLET tag missing CODE parameter. j...

C# Reference parameter passing

hi, i have a piece of code that isn't working, i'd appreciate any help you guys can provide me the code below is generating an exception ... but i'd think it shouldn't, unless i'm misinterpreting the ref semantics. EDIT: thanks for all the answer ... i know i'm instatiating a new Queue object in the One.Produce method ... but this is w...

How to run exe in powershell with parameters with spaces and quotes

How do you run this command in powershell: C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe -verb:sync -source:dbfullsql="Data Source=mysource;Integrated Security=false;User ID=sa;Pwd=sapass!;Database=mydb;" -dest:dbfullsql="Data Source=.\mydestsource;Integrated Security=false;User ID=sa;Pwd=sapass!;Database=mydb;",computername=10...

How do you force linq to sql to use the correct data type for sql parameters?

I have a situation where a certain linq query that runs against a multi-million row table is taking far to long to run. I dissected the linq query output and found that it was creating the parameters for the where clause using the wrong data type. For instance, one field was defined as a Char(12) in the database, but the parameter it was...

jQuery POST and GET methods: Construct URL or use data param?

I am using the post and get methods for Ajax calls, and have a general question. There are two methods I've seen people use on the web: Construct the URL and parameters by hand Use the data parameter Both approaches work. I've included them below: // Construct the POST URL by hand queryStringDelimiter = "?"; settings.queryParam =...

Custom Boolean values on a Report using Reporting Services

I have created a report that accepts a boolean value as a paramerter. However I wish to present the option as values differrnt than true or false. So I set up some default values and in my preview window I got a nice drop down containing my custom values. However when I deploy this to my server the nice drop down is replaced by the def...

Parameters cause sql query to time out.

I have a long SQL query, it does some inserts, updates, then deletes. Each query uses the same 2 parameters. If I pass them in as SQL parameters from C#, it times out, after 20 mins. I just put the parameters into the command text, and it works. When I use it with the parameters it doesn't even show up in the profiler till it times out. ...

SOLR - How to pass parameters to dataimport

How can i pass additional parameters to SOLR, while importing from database, using dataimport. Example: I have sql query, smth like this: Select * from documents where documentId > [myParameterHere] Can i somehow insert value to [myParameterHere]? ...

C++ positional parameters

Hi. This is a very basic question, so please bear with me. Consider the following function in C++: void foo(int a, int b, int c) { //do something } can I call this funtion like this: foo(b=2, c=3, a=2) ? I suppose this have some sort of name (positional parameters, possibly). If you could clarify it in the answer too, it would g...

Passing url as parameter to web service method

Hi I'm writing a web service which expects one of the parameters (called "hlink") to be a url. Before calling the web service I URLEncode the parameter in question ("hlink"). I then call the web service with an hlink parameter value of 'a.apsx?a=1&b=2. When the request arrives at the web service method I can examine hlink - it has rece...

Returning Output Param from SQL Connection

Is this possible or the right way to go about this (if you're not using a stored proc): conn.CommandText = "set @TotalPts = select SUM (pts) from cars where completedDate is not null and customerID = @customerID"; conn.AddParam("@customerID", customerID); conn.AddOutputParam("@TotalPts", SqlDbType.Int); ...

Silverlight passing parameters between pages using HyperlinkButton

Hi, I have a page that displays a list of users. each user has an ID and a HyperlinkButton to watch more details about the user. When pressing the HyperlinkButton, I would like to navigate to another page (called UserDetails) and somehow read the ID of the user that was pressed. How can I do that? Thanks, Ronny ...

Determine if string from argv[1] starts with a character or number (C-programming)

I'm writing a small application in C that takes two parameters. One is a filename, the other a number, and they may be specified in random order. ./main filename 12345 and ./main 12345 filename should both work. How can I easily determine which is which when I know the filename starts with a character? ...

Why is my Variable set to 0?

import java.lang.Math; public class NewtonIteration { public static void main(String[] args) { System.out.print(rootNofX(2,9)); } // computes x^n public static double power(double x, int n) { if (n==0) { return 1; } double Ergebnis = 1; for (int i=0; i<=Math.abs(n)-1; i++) { Ergebn...

Pass bash script parameters to sub-process unchanged

I want to write a simple bash script that will act as a wrapper for an executable. How do I pass all the parameters that script receives to the executable? I tried /the/exe $@ but this doesn't work with quoted parameters, eg. ./myscript "one big parameter" runs /the/exe one big parameter which is not the same thing. ...

Sharepoint (MOSS) XSL - PageUrl parameter not being found/displayed

I have a Data View Web Part, on a custom edit Page for a list. I want to grab the current URL and pass it to the next page, so I can return to the editing screen. I have followed these instructions to display the current page URL: http://www.stevesofian.net/post/XSLT-Tip-Get-Current-Page-URL.aspx Inside of Sharepoint Designer, the Url ...

livecycle designer data connection and retrieval with parameters

A couple of questions bundled here... The basics: I am working with a .NET application that needs to have a LiveCycle form connect to an Oracle database to retrieve some data so that the user opens the form and it pre-populates with their information. I am running into a couple problems - 1-Does anybody know how to parameterize a quer...