Search Results

Search found 131 results on 6 pages for 'manish nautiyal'.

Page 4/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • cookies handling on webrequest and response

    - by manish patel
    I have created a application that has a function mainpost. It is created to post data on a https sites. Here I want to handle cookies in this function. How can I do this task? public string Mainpost(string website, string content) { // this is what we are sending string post_data = content; // this is where we will send it string uri = website; // create a request HttpWebRequest request = (HttpWebRequest) WebRequest.Create(uri); request.KeepAlive = false; request.ProtocolVersion = HttpVersion.Version10; request.Method = "POST"; // turn our request string into a byte stream byte[] postBytes = Encoding.ASCII.GetBytes(post_data); // this is important - make sure you specify type this way request.ContentType = "application/x-www-form-urlencoded"; request.ContentLength = postBytes.Length; Stream requestStream = request.GetRequestStream(); // now send it requestStream.Write(postBytes, 0, postBytes.Length); requestStream.Close(); // grab te response and print it out to the console along with the status // code HttpWebResponse response = (HttpWebResponse)request.GetResponse(); string str = (new StreamReader(response.GetResponseStream()).ReadToEnd()); Console.WriteLine(response.StatusCode); return str; }

    Read the article

  • Master page property access from Content page.

    - by Manish
    FROM BOOK: To reference public properties in a master page, we add the @MasterType declaration to the content page and reference the property using Master.<PropertyName>. QUESTION: But what happens internally? Does all of the master's and content page's properties, function gets complied into one class? Or something else?

    Read the article

  • A code using SharePoint classes doesn't run on systems not having SharePoint installed

    - by Manish
    I have a window application which uses SP classes to create a site. I works fine on a system having Windows Server 2003 R2 with sharepoint installed. But it doesn't work on a system having XP installed and SharePoint not installed. The fact is that both of these systems are on a intranet. So I assumed that the NON-SP system would be able to run the code and create a site on the system having SP installed if all the required parameters (like serverLocation, domain, username, password) are provided. I did copied the DLLs to these NON-SP system and referenced them to build the project: Microsoft.SharePoint.dll microsoft.sharepoint.portal.dll Microsoft.SharePoint.Publishing.dll But this too didn't worked. What am I missing? Is my assumption wrong?

    Read the article

  • need to open an image open in web browser

    - by manish
    byte.eml file is having image base64 encoded value ..and i am tring to open it in browser ...but this is not populating image file....plz help me out.. this is code... Dim oFile As System.IO.File Dim orEAD As System.IO.StreamReader orEAD = oFile.OpenText("E:\mailbox\P3_hemantd.mbx\byte.eml") Dim content As String content = "" ''Dim intsinglechr As Integer ''Dim csinglechr As String While orEAD.Peek <> -1 content = content & Chr(orEAD.Read) content = Replace(content, vbCrLf, "") content = Replace(content, vbTab, "") content = Replace(content, " ", "") End While Response.ContentType = "image/jpeg" Response.BinaryWrite(Convert.FromBase64String(content))

    Read the article

  • loading data from a flat file to table using informatica, having both english and foreign language c

    - by Manish
    I am loading data from a flat file to table using informatica, the file has both english and foreign language characters like chinese, and others. The foreign language characters are not getting displayed properly after loading. How can this problem be solved ? I could solve it by using code page UTF - 16 Encoding of Unicode Platform Endian, earlier i was using different code page UTF-8.

    Read the article

  • Class inheriting from several Interfaces having same method signature

    - by Manish
    Say, I have three interfaces: public interface I1 { void XYZ(); } public interface I2 { void XYZ(); } public interface I3 { void XYZ(); } A class inheriting from these three interfaces: class ABC: I1,I2, I3 { // method definitions } Questions: If I implement like this: class ABC: I1,I2, I3 { public void XYZ() { MessageBox.Show("WOW"); } } It compiles well and runs well too! Does it mean this single method implementation is sufficient for inheriting all the three Interfaces? How can I implement the method of all the three interfaces and CALL THEM? I know it can done using explicit implementation but I'm not able to call them. :(

    Read the article

  • Running a graph returns E_FAIL

    - by Manish
    Hi, I have been struggling for a while now to get my filter graph to run .I am trying to crop a .wmv file into smaller duration .wmv files .It looks quite a simple task I dont know why its is getting so complicated.I follow this Source- SampleGrabber-WMA sf writer. Here is my code IBaseFilter* pASFWriter; ICaptureGraphBuilder2 * pBuilder=NULL; CoCreateInstance(CLSID_CaptureGraphBuilder2,NULL,CLSCTX_INPROC_SERVER,IID_ICaptureGraphBuilder2,(LPVOID*)&pBuilder); pBuilder-SetFiltergraph(pGraphBuilder); pBuilder-SetOutputFileName(&MEDIASUBTYPE_Asf,OUTFILE,&pASFWriter,NULL); IConfigAsfWriter *pConfig=NULL; HRESULT hr80 = pASFWriter-QueryInterface(IID_IConfigAsfWriter, (void**)&pConfig); if (SUCCEEDED(hr80)) { // Configure the ASF Writer filter. pConfig-Release(); } IBaseFilter *pSource=NULL; pGraphBuilder->AddSourceFilter(FILENAME,L"Source",&pSource); IBaseFilter *pGrabberF2=NULL; ISampleGrabber *pGrabber2=NULL; CoCreateInstance(CLSID_SampleGrabber,NULL,CLSCTX_INPROC_SERVER,IID_PPV_ARGS(&pGrabberF2)); pGraphBuilder->AddFilter(pGrabberF2,L"Sample Grabber2"); AM_MEDIA_TYPE mt1; ZeroMemory(&mt1,sizeof(mt1)); mt1.majortype=MEDIATYPE_Video; mt1.subtype=MEDIASUBTYPE_RGB24; pGrabberF2->QueryInterface(IID_ISampleGrabber,(void**)(&pGrabber2)); pGrabber2->SetBufferSamples(TRUE); pGrabber2->SetOneShot(FALSE); pGrabber->SetMediaType(&mt1); pSource->EnumPins(&pEnum2); pEnum2->Next(1,&pPin2,NULL); HRESULT hr108=ConnectFilters(pGraphBuilder,pPin2,pGrabberF2);//Source to Grabber pGrabberF2->EnumPins(&pEnum3); IEnumPins *pEnum4=NULL; pASFWriter->EnumPins(&pEnum4); IPin* pPin4=NULL; while (S_OK==pEnum3->Next(1,&pPin3,NULL)&& S_OK==pEnum4->Next(1,&pPin4,NULL)){ pGraphBuilder->Connect(pPin3,pPin4);//Grabber to FileWriter } pGraphBuilder->RenderFile(FILENAME,NULL);//FILENAME=INPUTFILENAME (.wmv format) pMediaPosition->put_CurrentPosition(start); pMediaPosition->put_StopTime(stop); HRESULT test1=pMediaControl->Run(); All of it runs fine(returns S_OK) .But test1 returns E_FAIL and no file is created.Can somebody help?

    Read the article

  • Cant render a .avi file

    - by Manish
    Hi, This is my 3rd post regarding this issue of cropping a file into smaller (same format files) .Please some one help me with this.Here is my code : CoInitialize(NULL); //Create the FGM CoCreateInstance(CLSID_FilterGraph,NULL,CLSCTX_INPROC_SERVER,IID_IGraphBuilder,(void**)(&pGraphBuilder)); //Query the Interfaces pGraphBuilder->QueryInterface(IID_IMediaControl,(void**)&pMediaControl); pGraphBuilder->QueryInterface(IID_IMediaEvent,(void**)&pMediaEvent); pGraphBuilder->QueryInterface(IID_IMediaPosition,(void**)&pMediaPosition); //Adding a Filewriter before calling the renderfile IBaseFilter *pWriter=NULL; IFileSinkFilter *pSink=NULL; CoCreateInstance(CLSID_FileWriter,NULL,CLSCTX_INPROC_SERVER,IID_PPV_ARGS(&pWriter)); pWriter->QueryInterface(IID_IFileSinkFilter,(void**)&pSink); pSink->SetFileName(OUTFILE,NULL); //Create a source filter IBaseFilter* pSource=NULL; HRESULT hr11=pGraphBuilder->AddSourceFilter(FILENAME,L"Source",&pSource); //Create a AVI mux IBaseFilter *pAVImux; CoCreateInstance(CLSID_AviDest,NULL,CLSCTX_INPROC_SERVER,IID_PPV_ARGS(&pAVImux)); pGraphBuilder->AddFilter(pAVImux,L"AVI Mux"); pGraphBuilder->AddFilter(pWriter,L"File Writer"); //Connect Source and Mux IEnumPins* pEnum1=NULL; IPin* pPin1=NULL; IEnumPins *pEnum2=NULL; IPin *pPin2=NULL; pSource->EnumPins(&pEnum1); pEnum1->Next(1,&pPin1,NULL); HRESULT hr1=ConnectFilters(pGraphBuilder,pPin1,pAVImux); //Mux to Writer HRESULT hr4=ConnectFilters(pGraphBuilder,pAVImux,pWriter); //Render the input file HRESULT hr3=pGraphBuilder->RenderFile(FILENAME,NULL); //Set Display times pMediaPosition->put_CurrentPosition(0); pMediaPosition->put_StopTime(2); //Run the graph HRESULT hr=pMediaControl->Run(); On running no video is shown. All the hresults return S_OK .A .avi file( larger than original is created) and I cannot play that file.

    Read the article

  • SPNavigationNode.IsVisible property not working in sharepoint as expected.

    - by Manish
    I want to hide a quick launch node in a sharepoint site, but it's not working as expected. :( My code is as under: using (SPSite spSiteTest = new SPSite(serverUrl)) { using (SPWeb mySite = spSiteTest.OpenWeb()) { SPNavigationNodeCollection quickLaunchNodes = mySite.Navigation.QuickLaunch; SPNavigationNode navQuickNode = new SPNavigationNode("Title", "www.stackoverflow.com", true); foreach (SPNavigationNode node in quickLaunchNodes) { if (node.Title == navQuickNode.Title) { node.Url = navQuickNode.Url; node.IsVisible = isVisible; node.Update(); //mySite.Update(); return; } } quickLaunchNodes.AddAsFirst(navQuickNode); } } Am I missing something or is it a bug?

    Read the article

  • How to check if a node's value in one XML is present in another XML with a specific attribute?

    - by Manish
    The question seems to be little confusing. So let me describe my situation through an example: Suppose I have an XML: A.xml <Cakes> <Cake>Egg</Cake> <Cake>Banana</Cake> </Cakes> Another XML: B.xml <Cakes> <Cake show="true">Egg</Cake> <Cake show="true">Strawberry</Cake> <Cake show="false">Banana</Cake> </Cakes> Now I want to show some text say "TRUE" if all the Cake in A.xml have show="true" in B.xml else "FALSE". In the above case, it will print FALSE. I need to develop an XSL for that. I can loop through all the Cake in A.xml and check if that cake has show="true" in B.xml but I don't know how to break in between (and set a variable) if a show="false" is found. Is it possible? Any help/comments appreciated.

    Read the article

  • Building a dll with .lib files

    - by Manish Shukla
    I have a C++ project which is build via bjam. With 'install' rule in Jamroot i am able to create statically linked libraries (.lib files) for my project. My question is, how i can build a load-time DLL (or run-time DLL is also fine) with these .lib files? More Info: I am building my project with bjam in windows using msvc. When i tried compiling my project under visual C++ 2008, it complied and linked just fine but when i used bjam with msvc for compilation, it started giving linking errors and showing dependency from other project folders. Why was this behavior via bjam but not shown in vc++ UI.

    Read the article

  • How to run an exe which is added in the project

    - by Manish
    First of all I did gave a look at this one. But I didn't got the solution. The accepted anser says to use it like this: Process p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = "myExec.exe"; p.Start(); But this is not working for me. THe exception's message says "The system cannot find the specified file". Am I missing something? I added the exe directly to the project itself.

    Read the article

  • Global keylogger in Java

    - by Manish
    I'm writing an application which monitors the person’s mouse and keyboard. If they have not used the keyboard or mouse for 1 minute, it should pops up a message which says “You have not used the mouse or keyboard for 1 minute” and an OK button. How do I do this in Java?

    Read the article

  • Disposing a dialog in touch devices in lwuit

    - by MANISH
    I am displaying a dialog when a user touches the screen and want the dialog to dispose when the user touches anywhere outside the dialog.i have set setDisposeWhenPointerOutOfBounds() to true though by default it is...n hav written the following code in pointerReleased() event but whenever the user touches the screen outside of dialog the dialog disposes but not without executing the code that shud be executed only wen the x,y are within the dialog....plz help me out....ne1... public void pointerReleased(int x, int y) { dispose(); if (contains(x, y)) { actionCommand((cmds[l.getSelectedIndex()])); } }

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >