Search Results

Search found 356 results on 15 pages for 'manish sharma'.

Page 11/15 | < Previous Page | 7 8 9 10 11 12 13 14 15  | Next Page >

  • 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

  • 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

  • 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

  • If array is thread safe, what the issue with this function?

    - by Ajay Sharma
    I am totally lost with the things that is happening with my code.It make me to think & get clear with Array's thread Safe concept. Is NSMutableArray OR NSMutableDictionary Thread Safe ? While my code is under execution, the values for the MainArray get's changes although, that has been added to Array. Please try to execute this code, onyour system its very much easy.I am not able to get out of this Trap. It is the function where it is returning Array. What I am Looking to do is : -(Array) (Main Array) --(Dictionary) with Key Value (Multiple Dictionary in Main Array) ----- Above dictionary has 9 Arrays in it. This is the structure I am developing for Array.But even before #define TILE_ROWS 3 #define TILE_COLUMNS 3 #define TILE_COUNT (TILE_ROWS * TILE_COLUMNS) -(NSArray *)FillDataInArray:(int)counter { NSMutableArray *temprecord = [[NSMutableArray alloc] init]; for(int i = 0; i <counter;i++) { if([temprecord count]<=TILE_COUNT) { NSMutableDictionary *d1 = [[NSMutableDictionary alloc]init]; [d1 setValue:[NSString stringWithFormat:@"%d/2011",i+1] forKey:@"serial_data"]; [d1 setValue:@"Friday 13 Sep 12:00 AM" forKey:@"date_data"]; [d1 setValue:@"Description Details " forKey:@"details_data"]; [d1 setValue:@"Subject Line" forKey:@"subject_data"]; [temprecord addObject:d1]; d1= nil; [d1 release]; if([temprecord count]==TILE_COUNT) { NSMutableDictionary *holderKey = [[NSMutableDictionary alloc]initWithObjectsAndKeys:temprecord,[NSString stringWithFormat:@"%d",[casesListArray count]+1],nil]; [self.casesListArray addObject:holderKey]; [holderKey release]; holderKey =nil; [temprecord removeAllObjects]; } } else { [temprecord removeAllObjects]; NSMutableDictionary *d1 = [[NSMutableDictionary alloc]init]; [d1 setValue:[NSString stringWithFormat:@"%d/2011",i+1] forKey:@"serial_data"]; [d1 setValue:@"Friday 13 Sep 12:00 AM" forKey:@"date_data"]; [d1 setValue:@"Description Details " forKey:@"details_data"]; [d1 setValue:@"Subject Line" forKey:@"subject_data"]; [temprecord addObject:d1]; d1= nil; [d1 release]; } } return temprecord; [temprecord release]; } What is the problem with this Code ? Every time there are 9 records in Array, it just replaces the whole Array value instead of just for specific key Value.

    Read the article

  • error C2297: '<<' : illegal, right operand has type 'double'

    - by Gopal Sharma
    string mesag=""; mesag="aDoubleArray value at 0------->"<<aDoubleArray[0]<<" aDoubleArray value at 1 is "<<aDoubleArray[1]; addLog(AMR_LT_WARN, mesag);// this part not working addLog(AMR_LT_WARN, "this works well"); i dont know anythng about c++ just want to print aDoubleArray values to log file but it throws error C2297: '<<' : illegal, right operand has type 'double'

    Read the article

  • Is there limit of "join" or the "where" or length of SQL query ?

    - by Chetan sharma
    Actually i was trying to get data from elgg database based on multiple joins. It generated very big query with lots of JOIN statements and query never respond back. SELECT distinct e.* from test_entities e JOIN test_metadata m1 on e.guid = m1.entity_guid JOIN test_metastrings ms1 on ms1.id = m1.name_id JOIN test_metastrings mv1 on mv1.id = m1.value_id JOIN test_objects_entity obj on e.guid = obj.guid JOIN test_metadata m2 on e.guid = m2.entity_guid JOIN test_metastrings ms2 on ms2.id = m2.name_id JOIN test_metastrings mv2 on mv2.id = m2.value_id JOIN test_metadata m3 on e.guid = m3.entity_guid JOIN test_metastrings ms3 on ms3.id = m3.name_id JOIN test_metastrings mv3 on mv3.id = m3.value_id JOIN test_metadata m4 on e.guid = m4.entity_guid JOIN test_metastrings ms4 on ms4.id = m4.name_id JOIN test_metastrings mv4 on mv4.id = m4.value_id JOIN test_metadata m5 on e.guid = m5.entity_guid JOIN test_metastrings ms5 on ms5.id = m5.name_id JOIN test_metastrings mv5 on mv5.id = m5.value_id JOIN test_metadata m6 on e.guid = m6.entity_guid JOIN test_metastrings ms6 on ms6.id = m6.name_id JOIN test_metastrings mv6 on mv6.id = m6.value_id where ms1.string='expire_date' and mv1.string <= 1272565800 and ms2.string='homecity' and mv2.string LIKE "%dasf%" and ms3.string='schoolname' and mv3.string LIKE "%asdf%" and ms4.string='award_amount' and mv4.string <= 123 and ms5.string='no_of_awards' and mv5.string <= 7 and ms6.string='avg_rating' and mv6.string <= 2 and e.type = 'object' and e.subtype = 5 and e.site_guid = 1 and (obj.title like '%asdf%') OR (obj.description like '%asdf%') and ( (e.access_id = -2 AND e.owner_guid IN ( SELECT guid_one FROM test_entity_relationships WHERE relationship='friend' AND guid_two=5 )) OR (e.access_id IN (2,1) OR (e.owner_guid = 5) OR ( e.access_id = 0 AND e.owner_guid = 5 ) ) and e.enabled='yes') and ( (m1.access_id = -2 AND m1.owner_guid IN ( SELECT guid_one FROM test_entity_relationships WHERE relationship='friend' AND guid_two=5 )) OR (m1.access_id IN (2,1) OR (m1.owner_guid = 5) OR ( m1.access_id = 0 AND m1.owner_guid = 5 ) ) and m1.enabled='yes') and ( (m2.access_id = -2 AND m2.owner_guid IN ( SELECT guid_one FROM test_entity_relationships WHERE relationship='friend' AND guid_two=5 )) OR (m2.access_id IN (2,1) OR (m2.owner_guid = 5) OR ( m2.access_id = 0 AND m2.owner_guid = 5 ) ) and m2.enabled='yes') and ( (m3.access_id = -2 AND m3.owner_guid IN ( SELECT guid_one FROM test_entity_relationships WHERE relationship='friend' AND guid_two=5 )) OR (m3.access_id IN (2,1) OR (m3.owner_guid = 5) OR ( m3.access_id = 0 AND m3.owner_guid = 5 ) ) and m3.enabled='yes') and ( (m4.access_id = -2 AND m4.owner_guid IN ( SELECT guid_one FROM test_entity_relationships WHERE relationship='friend' AND guid_two=5 )) OR (m4.access_id IN (2,1) OR (m4.owner_guid = 5) OR ( m4.access_id = 0 AND m4.owner_guid = 5 ) ) and m4.enabled='yes') and ( (m5.access_id = -2 AND m5.owner_guid IN ( SELECT guid_one FROM test_entity_relationships WHERE relationship='friend' AND guid_two=5 )) OR (m5.access_id IN (2,1) OR (m5.owner_guid = 5) OR ( m5.access_id = 0 AND m5.owner_guid = 5 ) ) and m5.enabled='yes') and ( (m6.access_id = -2 AND m6.owner_guid IN ( SELECT guid_one FROM test_entity_relationships WHERE relationship='friend' AND guid_two=5 )) OR (m6.access_id IN (2,1) OR (m6.owner_guid = 5) OR ( m6.access_id = 0 AND m6.owner_guid = 5 ) ) and m6.enabled='yes') order by obj.title limit 0, 10 this is the query that i am running.

    Read the article

  • Get latlng and draw a polyline between that two latlng

    - by anup sharma
    I have some issue in my code in that first I want to get latlng of my given address/city name from two text boxes after that i converts it to from position's latlng and to position's latlng and at last i want to draw a polyline between these point and markers on both point also, But now i am trying to draw a line between these points. But still not working this code also no any error in console also. code is here for your help. function getRoute(){ var from_text = document.getElementById("travelFrom").value; var to_text = document.getElementById("travelTo").value; if(from_text == ""){ alert("Enter travel from field") document.getElementById("travelFrom").focus(); } else if(to_text == ""){ alert("Enter travel to field"); document.getElementById("travelTo").focus(); } else{ //google.maps.event.addListener(map, "", function (e) { var myLatLng = new google.maps.LatLng(28.6667, 77.2167); var mapOptions = { zoom: 3, center: myLatLng, mapTypeId: google.maps.MapTypeId.TERRAIN }; var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var geocoder = new google.maps.Geocoder(); var address1 = from_text; var address2 = to_text; var from_latlng,to_latlng; //var prepath = path; //if(prepath){ // prepath.setMap(null); //} geocoder.geocode( { 'address': address1}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { // do something with the geocoded result // alert(results[0].geometry.location); from_latlng = results[0].geometry.location; // from_lat = results[0].geometry.location.latitude; // from_lng = results[0].geometry.location.longitude; // alert(from_latlng); } }); geocoder.geocode( { 'address': address2}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { // do something with the geocoded result to_latlng = results[0].geometry.location; // to_lat = results[0].geometry.location.latitude; // to_lng = results[0].geometry.location.longitude; // results[0].geometry.location.longitude // alert(to_latlng) } }); setTimeout(function(){ var flightPlanCoordinates = [ new google.maps.LatLng(from_latlng), new google.maps.LatLng(to_latlng) ]; //alert("123") var polyline; polyline = new google.maps.Polyline({ path: flightPlanCoordinates, strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 2 }); polyline.setMap(map); // assign to global var path // path = polyline; },4000); // }); } }

    Read the article

  • get distinct items in a collection if other item is not null

    - by Anurag Sharma
    I have a collection like this { Country : 'XYZ' Books : [ {"name" : "book1", "url" : "book1url", "auth_email" : "emailid1"}, {"name" : "book2", "url" : "book2url", "auth_email" : "emailid2"}, {"name" : "book3", "url" : "book3url", "auth_email" : "emailid3"}, {"name" : "book4", "url" : "book4url", "auth_email" : "emailid4"} .......................................... ] } I want to extract distinct 'Books.name' and corresponding 'Books.email' only if 'Books.email' is not = ''

    Read the article

  • Pedometer_Application in iphone

    - by Arun Sharma
    I am trying make the Pedometer application in iphone. I did n't find any code for this . How to calculate the step with use of acceleormeter.And how to display on screen of iphone I need the source code for using of accelerometer for step counting.PLe help me out from this.

    Read the article

  • How to implement python to find value between xml tags?

    - by Harshit Sharma
    I am using google site to retrieve weather information , I want to find values between XML tags. Following code give me weather condition of a city , but I am unable to obtain other parameters such as temperature and if possible explain working of split function implied in the code: import urllib def getWeather(city): #create google weather api url url = "http://www.google.com/ig/api?weather=" + urllib.quote(city) try: # open google weather api url f = urllib.urlopen(url) except: # if there was an error opening the url, return return "Error opening url" # read contents to a string s = f.read() # extract weather condition data from xml string weather = s.split("<current_conditions><condition data=\"")[-1].split("\"")[0] # if there was an error getting the condition, the city is invalid if weather == "<?xml version=": return "Invalid city" #return the weather condition return weather def main(): while True: city = raw_input("Give me a city: ") weather = getWeather(city) print(weather) if __name__ == "__main__": main() Thank You

    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 make secure SWFs?

    - by Ankur Sharma
    please tell me how to make secure SWF files, so that decompilers like sothink won't be able to decompile these swf files at all. i have been assigned some research work to find out the stuff to make swf files highly secured

    Read the article

  • Running a Model::find in for loop in cakephp v1.3

    - by Gaurav Sharma
    Hi all, How can I achieve the following result in cakephp: In my application a Topic is related to category, category is related to city and city is finally related to state in other words: topic belongs to category, category belongs to city , city belongs to state.. Now in the Topic controller's index action I want to find out all the topics and it's city and state. How can I do this. I can easily do this using a custom query ($this-Model-query() function ) but then I will be facing pagination difficulties. I tried doing like this function index() { $this->Topic->recursive = 0; $topics = $this->paginate(); for($i=0; $i<count($topics);$i++) { $topics[$i]['City'] = $this->Topic->Category->City->find('all', array('conditions' => array('City.id' => $topics[$i]['Category']['city_id']))); } $this->set(compact('messages')); } The method that I have adopted is not a good one (running query in a loop) Using the recursive property and setting it to highest value (2) will degrade performance and is not going to yield me state information. How shall I solve this ? Please help Thanks

    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

  • 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

  • UItableView Reload Problem

    - by Arun Sharma
    Hello All, I am using a UiTableView in our application.We have two tabs in controller one is add to shopping list where i add more than one items in our shopping list in database,other one is shopping list which shows items for shopping. The problem is that when i add items from shopping list tab then items are successfully added in database but when i click on shopping list tab then any items not shown in shopping list. How i reload data in UiTableView when i click on shopping list tab.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15  | Next Page >