Search Results

Search found 402 results on 17 pages for 'ashish sharma'.

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

  • invalidateList(); in flex3.0

    - by Ankur Sharma
    please tell me what invalidateList(); function does? i have one line of code, in which this function is getting called on arraycollection object like dg.invalidateList(); where dg is the id of datagrid, dataprovider for this dg is colors which is an arraycollection?? plzz tell me wht the invalidateList() function is doin? thanx

    Read the article

  • How to display .gif (with animation) on dc

    - by mukul sharma
    Hi All, in my application i am having a panel with associated a wxWindowDC and wxMemoryDC. i have to draw the various thing on that panel like bg color, on top of bg color bg image and on the top bg image i have to draw some text etc. I am storing all this thing into memory dc and finally in paint handler i m copying the memory dc to window dc. But i stuck in this process when i have a .gif (with multiple frames) and i m trying to bliting this gif image on DC that time it shows only a single frame of that gif image (its became a ordinary still image not an animated image). how i can store this whole gif image in memory dc and display full gif image on dc(with animation). I cant use wx.AnimateCrl() because i need that image in memoryDC. Any help really appreciable.

    Read the article

  • UitableView Problem in deleating items from database

    - by Arun Sharma
    Hi All, I am using in UitableView database.My table view works successfully (add single item,add multiple item,delete all) only problem is there when i want to delete single item for this i using Uitableview edit option. so how i add database method for deleting single item from database and also from table view. Please help me.

    Read the article

  • present a static page url as different url which is SEO friendly

    - by Gaurav Sharma
    Hi, I have developed a site, which has some static pages. Like explore, home, feedback. The link for these goes as follows website.com/views/explore.php website.com/index.php website.com/views/feedback.php I want to write a different SEO URL for each of the URL mentioned above. Is it possible ? i.e. for example website.com/views/explore.php should be convereted/visible as website.com/explore website.com/views/feedback.php should be convereted/visible as website.com/give/feedback and so on

    Read the article

  • protobuf-net NOT faster than binary serialization?

    - by Ashish Gupta
    I wrote a program to serialize a 'Person' class using XMLSerializer, BinaryFormatter and ProtoBuf. I thought protobuf-net should be faster than the other two. Protobuf serialization was faster than XMLSerialization but much slower than the binary serialization. Is my understanding incorrect? Please make me understand this. Thank you for the help. Following is the output:- Person got created using protocol buffer in 347 milliseconds Person got created using XML in 1462 milliseconds Person got created using binary in 2 milliseconds Code below using System; using System.Collections.Generic; using System.Linq; using System.Text; using ProtoBuf; using System.IO; using System.Diagnostics; using System.Runtime.Serialization.Formatters.Binary; namespace ProtocolBuffers { class Program { static void Main(string[] args) { string XMLSerializedFileName = "PersonXMLSerialized.xml"; string ProtocolBufferFileName = "PersonProtocalBuffer.bin"; string BinarySerializedFileName = "PersonBinary.bin"; var person = new Person { Id = 12345, Name = "Fred", Address = new Address { Line1 = "Flat 1", Line2 = "The Meadows" } }; Stopwatch watch = Stopwatch.StartNew(); watch.Start(); using (var file = File.Create(ProtocolBufferFileName)) { Serializer.Serialize(file, person); } watch.Stop(); Console.WriteLine(watch.ElapsedMilliseconds.ToString()); Console.WriteLine("Person got created using protocol buffer in " + watch.ElapsedMilliseconds.ToString() + " milliseconds " ); watch.Reset(); watch.Start(); System.Xml.Serialization.XmlSerializer x = new System.Xml.Serialization.XmlSerializer(person.GetType()); using (TextWriter w = new StreamWriter(XMLSerializedFileName)) { x.Serialize(w, person); } watch.Stop(); Console.WriteLine(watch.ElapsedMilliseconds.ToString()); Console.WriteLine("Person got created using XML in " + watch.ElapsedMilliseconds.ToString() + " milliseconds"); watch.Reset(); watch.Start(); using (Stream stream = File.Open(BinarySerializedFileName, FileMode.Create)) { BinaryFormatter bformatter = new BinaryFormatter(); //Console.WriteLine("Writing Employee Information"); bformatter.Serialize(stream, person); } watch.Stop(); Console.WriteLine(watch.ElapsedMilliseconds.ToString()); Console.WriteLine("Person got created using binary in " + watch.ElapsedMilliseconds.ToString() + " milliseconds"); Console.ReadLine(); } } [ProtoContract] [Serializable] public class Person { [ProtoMember(1)] public int Id {get;set;} [ProtoMember(2)] public string Name { get; set; } [ProtoMember(3)] public Address Address {get;set;} } [ProtoContract] [Serializable] public class Address { [ProtoMember(1)] public string Line1 {get;set;} [ProtoMember(2)] public string Line2 {get;set;} } }

    Read the article

  • Avaudioplayer problem

    - by Arun Sharma
    Hi All, Actually i am using avaudioplayer. my player is working very fine (forward,revind,play,pause,volume,progress bar). Only problem is that i am not able to stop the song. so all songs are overlapped please any body tell me where i put [self.player stop] to stop my player when i play new song.

    Read the article

  • UItableView Problem in deleting items from database

    - by Arun Sharma
    Hi All, I am using in UitableView database.My table view works successfully (add single item,add multiple item,delete all) only problem is there when i want to delete single item for this i using Uitableview edit option. so how i add database method for deleting single item from database and also from table view. Please help me.

    Read the article

  • Problem in databinding a dictionary in ListView combo-box column.

    - by Ashish Ashu
    I have a listview of which itemsource is set to my custom collection, let's say MyCollection. The code below is not full code , it's just a code snippets to explain the problem. class Item : INotifyPropertyChanged { Options _options; public Options OptionProp { get { return _options; } set { _options = value; OnPropertyChanged ("OptionProp");} } string _Name; public string NameProp { get { return _Name; } set { _Name = value; OnPropertyChanged ("NameProp");} } } class Options : Dictionary<string,string> { public Options() { this.Clear(); this.Add("One" , "1" ); this.Add("Two" , "2" ); this.Add("Three" , "3" ); } } MyCollection in my viewModel class viewModel { ObservableCollection<Item> **MyCollection**; KeyValuePair<sting,string> **SelectedOption**; } The listview Item Source is set to my MyCollection. <ListView ItemSource = MyCollectoin> I Listview contains two columns of which I have defined a datatemplats in the listview. First column is a combo-box of which Itemsource is set to Options ( defined above ) Second column is a simple textblock to display Name. Problem 1. I have defined a datatemplate for first column in which I have a combo box , I have set the Itemsource =**MyCollection** and SelectedItem = SelectedOption of the combo-box. User can perform following operations in the listview: Add ( Add the row in the listview ) Move Up ( Move row up in the listview ) Move Down ( Move down the item in the listview ) .Now when I add the row in the listview , the combo-box selected index is always comes to -1 (first column). However the combo box contains options One, Two and Three. Also, I have initialized the SelectedOption to contain the first item, i:e One. problem 2. . Let suppose, I have added a single row in a listview and I have selected Option "one" in the combo box manually. Now when I perform Move Up or Move Down operations the selected index of a combo box is again set to -1. In the Move Up or Move Down operation , I am calling MoveUp and MoveDown methods of the Observable collection. Probelm 3 How to serialize the entire collection in XML. Since I can't serialize the Dictionary and KeyValue Pair. I have to restore the state of the listview.

    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

  • How to track which character is deleted in TextBox in WPF?

    - by Ashish Ashu
    I want to track which character is deleted by the user through Delete or BackSpace Key. I am handling RichTextBox_ChangedEvent of textbox. Can I extract the deleted character from TextChangedEventArgs *e.Changes* and if yes How can I do that? I want to restrict user to from deleting any characters from the TextBox. I want user can delete only two characters ( let's say "(" or ")" ) Please suggest.

    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

  • How to take input for a character pointer without using fget?

    - by ashish yadav
    consider the code #include<stdio.h> int main() { char* a; scanf("%s",a);//&a and &a[0] give same results-crashes printf("%s",); return 0; } why does this code results in crashing?whereas this code using character array works fine? #include<stdio.h> int main() { char a[100]; scanf("%s",&a[0]);//works fine printf("%s",a); return 0; } the difference being character array and pointer?but i knew that pointer just points to the first element that is &a[0] should work fine but upper code crashes for all three that is a,&a and &a[0]? the main thing i would to gather is how can i take input of a character pointer if i insist on using scanf only? i apologize if i am not clear. thanks in advance:)

    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

  • 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 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

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