Search Results

Search found 1019 results on 41 pages for 'senthil kumar'.

Page 23/41 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • What is best way to remove ProgressDialog

    - by Sunil Kumar Sahoo
    I have created a progress dialog by ProgressDialog progressDialog = null; // create instance variable of ProgressDialog int dialogID = 1; //to create progress dialog protected Dialog onCreateDialog(int id) { progressDialog = new ProgressDialog(context); progressDialog.setMessage(message); progressDialog.setIcon(android.R.id.icon); return progressDialog; } // to show progressdialog showDialog(dialogID); To remove the dialog I am able to use any of the following three approaches approach-1 if(progressDialog != null){ progressDialog.dismiss(); } approach-2 if(progressDialog != null){ progressDialog.cancel(); } approach-3 removeDialog(dialogID); I found second approach is more effective than first approach. and if I have to use with more than one progressdialog it is easier to use approach-3. But what is the best way to destroy a progressdialog and How?

    Read the article

  • whats wrong in this LINQ synatx?

    - by Saurabh Kumar
    Hi, I am trying to convert a SQL query to LINQ. Somehow my count(distinct(x)) logic does not seem to be working correctly. The original SQL is quite efficient(or so i think), but the generated SQL is not even returning the correct result. I am trying to fix this LINQ to do what the original SQL is doing, AND in an efficient way as the original query is doing. Help here would be really apreciated as I am stuck here :( SQL which is working and I need to make a comparable LINQ of: SELECT [t1].[PersonID] AS [personid] FROM [dbo].[Code] AS [t0] INNER JOIN [dbo].[phonenumbers] AS [t1] ON [t1].[PhoneCode] = [t0].[Code] INNER JOIN [dbo].[person] ON [t1].[PersonID]= [dbo].[Person].PersonID WHERE ([t0].[codetype] = 'phone') AND ( ([t0].[CodeDescription] = 'Home') AND ([t1].[PhoneNum] = '111') OR ([t0].[CodeDescription] = 'Work') AND ([t1].[PhoneNum] = '222') ) GROUP BY [t1].[PersonID] HAVING COUNT(DISTINCT([t1].[PhoneNum]))=2 The LINQ which I made is approximately as below: var ids = context.Code.Where(predicate); var rs = from r in ids group r by new { r.phonenumbers.person.PersonID} into g let matchcount=g.Select(p => p.phonenumbers.PhoneNum).Distinct().Count() where matchcount ==2 select new { personid = g.Key }; Unfortunately, the above LINQ is NOT generating the correct result, and is actually internally getting generated to the SQL shown below. By the way, this generated query is also reading ALL the rows(about 19592040) around 2 times due to the COUNTS :( Wich is a big performance issue too. Please help/point me to the right direction. Declare @p0 VarChar(10)='phone' Declare @p1 VarChar(10)='Home' Declare @p2 VarChar(10)='111' Declare @p3 VarChar(10)='Work' Declare @p4 VarChar(10)='222' Declare @p5 VarChar(10)='2' SELECT [t9].[PersonID], ( SELECT COUNT(*) FROM ( SELECT DISTINCT [t13].[PhoneNum] FROM [dbo].[Code] AS [t10] INNER JOIN [dbo].[phonenumbers] AS [t11] ON [t11].[PhoneType] = [t10].[Code] INNER JOIN [dbo].[Person] AS [t12] ON [t12].[PersonID] = [t11].[PersonID] INNER JOIN [dbo].[phonenumbers] AS [t13] ON [t13].[PhoneType] = [t10].[Code] WHERE ([t9].[PersonID] = [t12].[PersonID]) AND ([t10].[codetype] = @p0) AND ((([t10].[codetype] = @p1) AND ([t11].[PhoneNum] = @p2)) OR (([t10].[codetype] = @p3) AND ([t11].[PhoneNum] = @p4))) ) AS [t14] ) AS [cnt] FROM ( SELECT [t3].[PersonID], ( SELECT COUNT(*) FROM ( SELECT DISTINCT [t7].[PhoneNum] FROM [dbo].[Code] AS [t4] INNER JOIN [dbo].[phonenumbers] AS [t5] ON [t5].[PhoneType] = [t4].[Code] INNER JOIN [dbo].[Person] AS [t6] ON [t6].[PersonID] = [t5].[PersonID] INNER JOIN [dbo].[phonenumbers] AS [t7] ON [t7].[PhoneType] = [t4].[Code] WHERE ([t3].[PersonID] = [t6].[PersonID]) AND ([t4].[codetype] = @p0) AND ((([t4].[codetype] = @p1) AND ([t5].[PhoneNum] = @p2)) OR (([t4].[codetype] = @p3) AND ([t5].[PhoneNum] = @p4))) ) AS [t8] ) AS [value] FROM ( SELECT [t2].[PersonID] FROM [dbo].[Code] AS [t0] INNER JOIN [dbo].[phonenumbers] AS [t1] ON [t1].[PhoneType] = [t0].[Code] INNER JOIN [dbo].[Person] AS [t2] ON [t2].[PersonID] = [t1].[PersonID] WHERE ([t0].[codetype] = @p0) AND ((([t0].[codetype] = @p1) AND ([t1].[PhoneNum] = @p2)) OR (([t0].[codetype] = @p3) AND ([t1].[PhoneNum] = @p4))) GROUP BY [t2].[PersonID] ) AS [t3] ) AS [t9] WHERE [t9].[value] = @p5 Thanks!

    Read the article

  • GCC Dynamic library building problem

    - by Sirish Kumar
    I am new to linux, while compiling with dynamic library I am getting the segmentationfault error. I have two files ctest1.c void ctest1(int *i) { *i =10; } ctest2.c void ctest2(int *i) { *i =20; } I have compiled both files to a shared library named libtest.so using following command gcc -shared -W1,-soname,libtest.so.1 -o libtest.so.1.0.1 ctest1.o ctest2.o -lc And I have wrote another program prog.c which uses functions exported by this library prog.c #include void (ctest1)(int); void (ctest2)(int*); int main() { int a; ctest1(&a); printf("%d",a); return 0; } And when I have built the executable with following command gcc -Wall prog.c -L. -o prog But when I run the generated executable I get the SegmentationFault error. When I checked the header of prog with ldd it shows linux-vdso.so.1 = (0x00007f99dff000) libc.so.6 = /lib64/libc.so.6 (0x0007feeaa8c1000) /lib64/ld-linux-x86-64.so.2 (0x00007feeaac1c000) Can somebody tell what is the problem

    Read the article

  • Data Grid Styles Designer

    - by Kumar
    Looking for any decent grid styles designer with standard features such as select columns from a catalog Change the ordering of columns set column font/bold/italic etc. set column styles - fixed left / right etc. Have done it before but don't have access to that code Looking for any near ready to use sample before reinventing the wheel :) preferably winforms but can use wpf too

    Read the article

  • How to build a search engine in C#

    - by Kumar
    I am trying to build a web application in ASP.NET MVC and need build a pretty complex search feature. When a user enters a search term I want to search a variety of data sources which include documents, tables in the database, webpage urls and some APIs like facebook. Any tips, tutorials and hints would be greatly appreciated.

    Read the article

  • File Formats Supported by UIWebView

    - by Mugunth Kumar
    What are all the file formats supported by UIWebView? In my testing, I found that it supports XLS, DOC, PPT, PDF but not XLSX, and DOCX, RTF. It supports image files like, JPG, PNG, GIF, BMP, not sure about TIFF or Exactly, what all types are supported is not clear... The UIWebView documentation also doesn't state it clearly. Could someone please help?

    Read the article

  • Angularjs: addition of integers even after I parse the variable as integer

    - by Shiv Kumar
    I really have a weird problem in adding two numbers. Here is my code, in the first controller everything is working fine, but in the second controller instead of 0 if I add 10, the output is completely weird Here is html code <div ng-app=""> <div ng-controller="Controller1"> <br/>**** Controller-1 <br/>Add 0 : {{update1(0)}} <br/>Add 10 : {{update1(10)}} <br/>Add 50 : {{update1(50)}} <br/>Add -60 : {{update1(-60)}}</div> <div ng-controller="Controller2"> <br/>**** Controller-2 <br/>Add 10 : {{update2(10)}} <br/>Add 10 : {{update2(10)}} <br/>Add 50 : {{update2(50)}} <br/>Add -60 : {{update2(-60)}}</div> </div> Here is my javascript function Controller1($scope) { var x = 0; $scope.update1 = function (smValue) { x += parseInt(smValue); return x; } } function Controller2($scope) { var y = 0; $scope.update2 = function (smValue) { y += parseInt(smValue); return y; } } and here is the output **** Controller-1 Add 0 : 0 Add 10 : 10 Add 50 : 60 Add -60 : 0 **** Controller-2 Add 0 : 110 Add 10 : 120 Add 50 : 170 Add -60 : 110 here is the link to try: http://jsfiddle.net/6VqqN/ can anyone please explain me why it is behaving like that. Even if I add a 3or4 digit number, output is completely different then what I expected.

    Read the article

  • Invoke does not exist in the current context?

    - by Pawan Kumar
    Invoke does not exist in the current context. The same method was not giving any error in Form.cs class but when I used in other class in same project it gives error. i am using threading on forms control. private void UpdateText(object fileName) { if (Textbox.InvokeRequired) { UpdateTextCallback back = new UpdateTextCallback(UpdateText); this.Invoke(back, new object[] { fileName }); } }

    Read the article

  • Comparing Nested object properties using C#

    - by Kumar
    I have a method which compares two objects and returns a list of all the property names which are different. public static IList<string> GetDifferingProperties(object source, object) { var sourceType = source.GetType(); var sourceProperties = sourceType.GetProperties(); var targetType = target.GetType(); var targetProperties = targetType.GetProperties(); var properties = (from s in sourceProperties from t in targetProperties where s.Name == t.Name && s.PropertyType == t.PropertyType && s.GetValue(source,null) != t.GetValue(target,null) select s.Name).ToList(); return properties; } For example if I have two classes as follows: public class Address { public string AddressLine1 { get; set; } public string AddressLine2 { get; set; } public string City { get; set; } public string State { get; set; } public string Zip { get; set; } } public class Employee { public string FirstName { get; set; } public string MiddleName { get; set; } public string LastName { get; set; } public Address EmployeeAddress { get; set; } } I am trying to compare the following two employee instances: var emp1Address = new Address(); emp1Address.AddressLine1 = "Microsoft Corporation"; emp1Address.AddressLine2 = "One Microsoft Way"; emp1Address.City = "Redmond"; emp1Address.State = "WA"; emp1Address.Zip = "98052-6399"; var emp1 = new Employee(); emp1.FirstName = "Bill"; emp1.LastName = "Gates"; emp1.EmployeeAddress = emp1Address; var emp2Address = new Address(); emp2Address.AddressLine1 = "Gates Foundation"; emp2Address.AddressLine2 = "One Microsoft Way"; emp2Address.City = "Redmond"; emp2Address.State = "WA"; emp2Address.Zip = "98052-6399"; var emp2 = new Employee(); emp2.FirstName = "Melinda"; emp2.LastName = "Gates"; emp2.EmployeeAddress = emp2Address; So when I pass these two employee objects to my GetDifferingProperties method currently it returns FirstName and EmployeeAddress, but it does not tell me which exact property (which in this case is Address1) in the EmployeeAddress has changed. How can I tweak this method to get something like EmployeeAddress.Address1?

    Read the article

  • how to make grid column as drop down list for all rows using jquery

    - by kumar
    Hello friends.. colNames: ['A','B','C','D'], colModel: [ { name: 'A', index: 'A', width: 90 }, { name: 'B', index: 'B', width: 100 }, { name: 'C', index: 'C', width: 70 }, { name: 'D', index: 'D', edittype: 'select', width: 100, editoptions: { value: { 1: 'Yes', 2: 'No'}} } ], My concersn here is.. I am displying A B C D values from db2... for Last Column D I need to put defalut drop down list for all the rows. Thanks can any body help me out.. thanks

    Read the article

  • How to solve this problem in Vaadin Table?

    - by Kumar
    Hi Friends, I used Vaadin Table component in my application and i set a page length to 15, Length of the Table is not consistent in different screens resolutions . For example in 1440 x 900 resolution height of the table is big but in 1280 x 1024 resolution the height of the table is less . I don't know how to solve this problem.Can any one help me to sort out this problem. Thanks in advance.

    Read the article

  • smtp.Send() Issue

    - by Kumar
    I building a web application in ASP.NET 3.5 and C#. I have a method in my project which sends emails to the users. But for some reason the smtp send method is taking 3 to 4 seconds to execute: SmtpClient smtp = new SmtpClient(); smtp.Send(msg);-----> This is the line of code which takes 3 to 4 seconds to execute What could be the reasons behind this delay?

    Read the article

  • How to change the band height dynamically?

    - by Kumar
    Is it possible to modify the height of detail band dynamically in jasper report? Because in my application i need to create pdf document.I have used one main document inside detail band of that main document i used one subreport. Sub report will take java bean as data source. This java bean return a list of field. So if we fixed the size of band then some time all values are not stretch in the document. Is it possible to change the detail band dynamically.

    Read the article

  • Can anybody help me out with this error.?

    - by kumar
    Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property. in jquery gird on button click i am displaying something like 28000 rows? I know some of them are sujjested to define the JsonmaxLength in web config file.. but its not working for me? can anybody tell me about this? thanks

    Read the article

  • How to get these values front end using asp.net mvc

    - by kumar
    hello friends, <div> <label> Date: <span><input type="text" id="date" /></span> <%--<%=Html.EditorFor(model=>model.Date) %>--%> // Should I use this as Input type? </label> <label> Number#: <%=Html.TextBox("Number", ViewData["inq"] ?? "")%> </label> <label>Comment</label> <span> <%=Html.TextArea("value")%> <%=Html.ValidationMessage("value")%> </span> </div> I am trying to get these three fields on the screen while user enters I am retreving the user enter data on front end.. when I am debugging I am not seeing these fields.. On the view I am using beginForm <% using (Html.BeginForm("Update", "Home", FormMethod.Post, new { @id = "id" })) { %> my method.. public JsonResult Update(StudentInfo info) { Update/// return Json(Status.ToString()); } when I see in info I am not getting these three fields.. can any one help me out thanks

    Read the article

  • Apply limit in mapreduce function in php?

    - by Rohan Kumar
    How to apply limit in php, mongodb when using mapreduce function? I tried this $cmd=array(// codition array "mapreduce" => "user", "map" => $map, "reduce" => $reduce, "out" => array("inline" => 1), "limit"=>2 ); $db=connect(); $query = $db->command($cmd);// run command But its not working it gives 2 documents.I can't use limit on sub documents. If I have 100's of sub documents and then I want paging in sub documents.Then it fails.Is it possible to apply limit on sub documents?

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >