Search Results

Search found 135 results on 6 pages for 'manish kosta'.

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

  • Saving Types generated via Reflection.Emit as code file (.cs) instead of saving it in .dll files

    - by Manish Sinha
    Before start let me tell my experience: I am experienced with C#.NET, web services, XML part and few more. Reflection is something new to me, though I have read extensively on it and tried out some experimental code, but haven't made anything great using reflection I checked out many examples of how we can create Type at runtime and then which can be saved in an assembly (.dll) files. Of all the examples I have seen is about saving the created types in the .dll files instead of code file. Isn't there any way to create the code file out of reflection? I need to create code file since I want to distribute code instead of compiled assemblies. What I want to do is something like xsd.exe does, either spit out a .dll or the code file(in any language). Isn't there any way to create a code file, since most of the place I can find is AssemblyBuilder ab = System.AppDomain.CurrentDomain.DefineDynamicAssembly(an, AssemblyBuilderAccess.Save); and then lastly ab.Save("QuoteOfTheDay.dll");

    Read the article

  • video API iphone

    - by Manish
    Hi, I want to play H.264 video streamed from network. To play video iphone provides the media player API. Does anyone one aware of any documented or undocumented API for decoding and playing single video frame?

    Read the article

  • 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

  • Writing a .wmv file using WMA sf filter

    - by Manish
    Hi I am trying to create an output .wmv file using WM Asf writer filter.Here is my code . IBaseFilter* pASFWriter; CoCreateInstance(CLSID_WMAsfWriter,NULL,CLSCTX_INPROC_SERVER,IID_IBaseFilter,(void**) (&pASFWriter)); pGraphBuilder-AddFilter(pASFWriter,L"FileWriter"); IFileSinkFilter *pSink2=NULL; pASFWriter-QueryInterface(IID_IFileSinkFilter,(void**)&pSink2); pSink2-SetFileName(OUTFILENAME,NULL); All of the above return S_OK however there is no file created .I am not able to understand why this is so?

    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

  • NameError in CompetitorsController#index

    - by manish nautiyal
    Hi all I am getting this problem when I run this code in server. In my localhost everything is running fine. But when I deploy my code in the server it shows me the error. I am using FERRET SERARCH IN MODEL. NameError in CompetitorsController#index uninitialized constant CompetitorsController::Competitor /opt/ruby_enterprise/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:102:in `const_missing' /home/troche/mrecip_tool/releases/20091219131859/app/controllerscompetitors_controller .rb :19:in `index' My controller is class CompetitorsController < ApplicationController include AuthenticatedSystem layout 'application' auto_complete_for :proscribed, :competitor auto_complete_for :fee_earner, :fee_earner protect_from_forgery :only = [:tag] before_filter :login_required, :only = [:index, :show, :new, :edit] @@total_company = 70 def index @compet = Competitor.find(:all) ### GETTING ERROR IN THIS LINE respond_to do |format| format.html # index.html.erb format.xml { render :xml => @compet } end end def show @competitor = Competitor.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @competitor } end end end My Model is class Competitor < ActiveRecord::Base validates_presence_of :fee_earner_id, :notes belongs_to :fee_earner belongs_to :country belongs_to :state belongs_to :user acts_as_ferret :fields =[:competitor, :client, :subject_matter],:remote = true end

    Read the article

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