Search Results

Search found 1359 results on 55 pages for 'doubt'.

Page 3/55 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Have a doubt on uritemplates in WCF Services

    - by Debby
    I have a webservice with following operation contract and my service is hosted at //localhost:9002/Service.svc/ (I did not put http: before the localhost, as new user can post only one hyperlink) [OperationContract] [WebGet ( UriTemplate = "/Files/{Filepath}" ) ] Stream DownloadFile(string Filepath); This webservice would let users download file, if the proper filepath is provided (assuming, i somehow findout proper filepath). Now, I can access this service from a browser by typing, //localhost:9002/Service.svc/Files/(Filepath} If {filepath} is some simple string, its not a problem, but i want to send the location of the file. Lets us say users want to download file "C:\Test.mp3" on the server. But how can I pass "C:\Test.mp3" as {Filepath}. I get an error when i type http://localhost:9002/Service.svc/Files/C:\Test.mp3 in the browser. I am new to webservices and find that quickest way to clear doubts is in this community.

    Read the article

  • doubt regarding sequence points

    - by tushar
    i recently came across a question about sequence points in c++ at this site what the code will output: int c=0; cout<<c++<<c; it was answered that the output is undefined and << is not a sequence point but still i want to know why does it that even if i compile it 25 times it still prints 01

    Read the article

  • C++ operator overloading doubt

    - by avd
    I have a code base, in which for Matrix class, these two definitions are there for () operator: template <class T> T& Matrix<T>::operator() (unsigned row, unsigned col) { ...... } template <class T> T Matrix<T>::operator() (unsigned row, unsigned col) const { ...... } One thing I understand is that the second one does not return the reference but what does const mean in the second declaration. Also which function is called when I do say mat(i,j)

    Read the article

  • Simple doubt related to strings in C

    - by piemesons
    // The first example: char text[] = "henri"; char *p; p = text; *(p + 1) = 'E'; // Output = hEnri // Now If we want to remove the "e" ie hnri, we would go for????? *(p + 1)=????? Please dont say start copying the array. I am looking for the best solution

    Read the article

  • doubt in Exceptions

    - by Ajay Singh
    class MyException extends Exception { MyException() {} MyException(String msg) { super(msg);} } public class NewException { static void f() throws MyException { System.out.println("throwing exception from f()"); throw new ClassCastException(); } static void g() throws MyException { System.out.println("throwing exception from g()"); throw new MyException("parametrized "); } public static void main(String ...strings ) { try { f(); } catch(MyException e) { e.printStackTrace(System.out); } try { g(); } catch(MyException e) { e.printStackTrace(System.out); } } } In the function f() iam specifying that "MyException " exception will be thrown and actually iam throwing some other exception which has no relation with MyException but still the compiler does not report any complain.Why is it so??

    Read the article

  • Java Inheritance doubt in parameterised collection

    - by Gala101
    It's obvious that a parent class's object can hold a reference to a child, but does this not hold true in case of parameterised collection ?? eg: Car class is parent of Sedan So public void doSomething(Car c){ ... } public void caller(){ Sedan s = new Sedan(); doSomething(s); } is obviously valid But public void doSomething(Collection<Car> c){ ... } public void caller(){ Collection<Sedan> s = new ArrayList<Sedan>(); doSomething(s); } Fails to compile Can someone please point out why? and also, how to implement such a scenario where a function needs to iterate through a Collection of parent objects, modifying only the fields present in parent class, using parent class methods, but the calling methods (say 3 different methods) pass the collection of three different subtypes.. Ofcourse it compiles fine if I do as below: public void doSomething(Collection<Car> c){ ... } public void caller(){ Collection s = new ArrayList<Sedan>(); doSomething(s); }

    Read the article

  • Simple doubt related to strings in C (question in an interview)

    - by piemesons
    // The first example: char text[] = "henri"; char *p; p = text; *(p + 1) = 'E'; // Output = hEnri // Now If we want to remove the "e" ie hnri, we would go for????? *(p + 1)=????? Please dont say start copying the array. I am looking for the best solution. Its an interview question... EDIT I specially mentioned the question that i am not asking for the solution like start moving the element. I thought there must be some other good solution..

    Read the article

  • Array Related Doubt.......

    - by AGeek
    I have the following program........... int insert(int *array, int arraySize, int newElement) { array[arraySize + 1] = newElement; return (arraySize+1); // Return new Array size...... } int main() { int array[] = {1,2,3,4,5}; int arraySize = sizeof(array) / sizeof(int); insertInArray(array, arraySize,6); print(array); } I am trying to work out this program in C programming language... But when i print the array after insertion,,, it doesn't prints the desired output which is needed.. Please correct me if i am doing something wrong..... Thanks..

    Read the article

  • T-SQL Specific Syntax problem (Simple no doubt)

    - by Yoda
    Hi guys, I have an issue with a query I'm trying to run on some data, I guess the place to start is to describe the data. Ok so I have a list of email addresses, each email address has a unique ID and an account ID Also in my tables I have a set number which auto incrememnts, this will allow me to target duplicate email addresses What I need to do is something like this. Insert into duplicates (EMAIL,ACCOUNTID,ID) SELECT Email,AccountID,ID FROM EmailAddresses Group by Email,AccountID Having Count(email)>1 Order by AccountID, Email So essentially I want to select all duplicate email addresses and insert them (and their relative fields) into a new table broken down by accountID so I can run some further querys on it. I have been battling with this for way too long and could just use a fresh perspective. Cheers in advance

    Read the article

  • Doubt about odbc's in c#

    - by aF
    Hello, I run a c# process and in the middle of the night this happens: ERROR [HY000][DataDirect][ODBC Sybase Wire Protocol driver] Timeout exceeded I know for sure that the database is allways active! But this keeps happening! Do you how can I fix this error? Thanks in advance!

    Read the article

  • Doubt in stored procedure in asp.net

    - by Surya sasidhar
    hi, i am writing a sotreprocedure displaying month and year it is working but it is not coming in a order descending order can u help me my procedure like below... ALTER procedure [dbo].[audioblog_getarchivedates] as begin select DateName(Month,a.createddate) + ' ' + DateName(Year,a.createddate) as ArchiveDate from audio_blog a group by DateName(Month,a.createddate) + ' ' + DateName(Year,a.createddate) order by DateName(Month,a.createddate) + ' ' + DateName(Year,a.createddate) desc end result will come like this March 2010 January 2010 February 2010 but it is not in a order (desc) can u help me

    Read the article

  • Doubt on pointer conversion

    - by Simone
    Suppose we have the following code: #include <iostream> struct A { virtual void f() { std::cout << "A::f()" << std::endl; } }; struct B: A { void f() { std::cout << "B::f()" << std::endl; } }; void to_A(void* voidp) { A* aptr = static_cast<A*>(voidp); aptr->f(); } void to_B(void* voidp) { B* bptr2 = static_cast<B*>(voidp); bptr2->f(); } int main() { B* bptr = new B; void* voidp = bptr; to_A(voidp); // prints B::f() to_B(voidp); // prints B::f() } is this code guaranteed to always work as in the code comments or is it UB? AFAIK it should be ok, but I'd like to be reassured.

    Read the article

  • Doubt about a particular pattern of Javascript class definition

    - by fenderplayer
    Recently i saw the following code that creates a class in javascript: var Model.Foo = function(){ // private stuff var a, b; // public properties this.attr1 = ''; this.attr2 = ''; if(Model.Foo._init === 'undefined'){ Model.Foo.prototype = { func1 : function(){ //...}, func2 : function(){ //... }, //other prototype functions } } Model.Foo._init = true; } // Instantiate and use the class as follows: var foo = new Model.Foo(); foo.func1(); I guess the _init variable is used to make sure we don't define the prototypes again. Also, i feel the code is more readable since i am placing everything in a function block (so in oop-speak, all attributes and methods are in one place). Do you see any issues with the code above? Any pitfalls of using this pattern if i need to create lots of classes in a big project?

    Read the article

  • Doubt in Conditional inclusion

    - by Philando Gullible
    This is actually extracted from my module (Pre-processor in C) The conditional expression could contain any C operator except for the assignment operators,increment, and decrement operators. I am not sure if I am getting this statement or not since I tried using this and it worked.Also for other manipulation a probable work around would be to simply declare macro or function inside the conditional expression,something like this to be precise. Also I don't understand what is the rationale behind this rule. Could somebody explain? Thanks

    Read the article

  • Google Calendar doubt?

    - by Sumi
    I am new to android. I need to add events to Google calendar from my application. How to integrate with google calendar? What are the jar files are needed? Is it needed to enable any gmail setting? I need some help .Can anyone help me to solve this??

    Read the article

  • C++ compile time polymorphism doubt ?

    - by user313921
    Below program contains two show() functions in parent and child classes, but first show() function takes FLOAT argument and second show() function takes INT argument. .If I call show(10.1234) function by passing float argument, it should call class A's show(float a) function , but it calls class B's show(int b). #include<iostream> using namespace std; class A{ float a; public: void show(float a) { this->a = a; cout<<"\n A's show() function called : "<<this->a<<endl; } }; class B : public A{ int b; public: void show(int b) { this->b = b; cout<<"\n B's show() function called : "<<this->b<<endl; } }; int main() { float i=10.1234; B Bobject; Bobject.show((float) i); return 0; } Output: B's show() function called : 10 Expected output: A's show() function called : 10.1234 Why g++ compiler chosen wrong show() function i.e class B's show(int b) function ?

    Read the article

  • C++ inheritance doubt

    - by Poiuyt
    Can you explain why this is not allowed, #include <stdio.h> class B { private: int a; public: int a; }; int main() { return 0; } while this is? #include <stdio.h> class A { public: int a; }; class B : public A{ private: int a; }; int main() { return 0; } In both the cases, we have one public and one private variable named a in class B.

    Read the article

  • Doubt regarding usage of array as a pointer in C

    - by Som
    For eg. I have an array of structs 'a' as below: struct mystruct{ int b int num; }; struct bigger_struct { struct my_struct a[10]; } struct bigger_struct *some_var; i know that the name of an array when used as a value implicitly refers to the address of the first element of the array.(Which is how the array subscript operator works at-least) Can i know do the other way around i.e if i do: some_var->a->b, it should be equivalent to some_var->a[0]->b, am i right? I have tested this and it seems to work , but is this semantically 100% correct?

    Read the article

  • Doubt in switch case

    - by user302593
    Hi.. When i executes the following program it get the user input for account details and then print it correctly...But it cannot read the opt value(y/n)..it automatically calls again..i want to exit the program when i press n value... please help to solve this problem.. char opt; do { //Getting user input printf("\n Enter the Account Number:\n "); scanf("%d",&gAccNo_i); printf("\n Enter the Account Holder's Name:\n "); scanf("%s",gCustName_c); printf("\n Enter the Balance Amount:\n "); scanf("%f",&gBlncAmt_f); //Printing the inputted data. printf("\n Account Number : %d",gAccNo_i); printf("\n Customer Name : %s",gCustName_c); printf("\n Balance Amount : %f",gBlncAmt_f); printf("\n Do u want to wish to continue?(y/n)"); scanf("%c",&opt); }while(opt!='n');

    Read the article

  • java source code doubt

    - by abson
    Why is it that class swi22 { public static void main(String[] args) { int a=98; switch(a) { default:{ System.out.println("default");continue;} case 'b':{ System.out.println(a); continue;} case 'a':{ System.out.println(a);} } System.out.println("Switch Completed"); } } gives error as: continue outside of loop

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >