Search Results

Search found 226 results on 10 pages for 'pradeep reddy kypa'.

Page 7/10 | < Previous Page | 3 4 5 6 7 8 9 10  | Next Page >

  • Use Linq to SQL to generate sales report

    - by Richard Reddy
    I currently have the following code to generate a sales report over the last 30 days. I'd like to know if it would be possible to use linq to generate this report in one step instead of the rather basic loop I have here. For my requirement, every day needs to return a value to me so if there are no sales for any day then a 0 is returned. Any of the Sum linq examples out there don't explain how it would be possible to include a where filter so I am confused on how to get the total amount per day, or a 0 if no sales, for the last days I pass through. Thanks for your help, Rich //setup date ranges to use DateTime startDate = DateTime.Now.AddDays(-29); DateTime endDate = DateTime.Now.AddDays(1); TimeSpan startTS = new TimeSpan(0, 0, 0); TimeSpan endTS = new TimeSpan(23, 59, 59); using (var dc = new DataContext()) { //get database sales from 29 days ago at midnight to the end of today var salesForDay = dc.Orders.Where(b => b.OrderDateTime > Convert.ToDateTime(startDate.Date + startTS) && b.OrderDateTime <= Convert.ToDateTime(endDate.Date + endTS)); //loop through each day and sum up the total orders, if none then set to 0 while (startDate != endDate) { decimal totalSales = 0m; DateTime startDay = startDate.Date + startTS; DateTime endDay = startDate.Date + endTS; foreach (var sale in salesForDay.Where(b => b.OrderDateTime > startDay && b.OrderDateTime <= endDay)) { totalSales += (decimal)sale.OrderPrice; } Response.Write("From Date: " + startDay + " - To Date: " + endDay + ". Sales: " + String.Format("{0:0.00}", totalSales) + "<br>"); //move to next day startDate = startDate.AddDays(1); } }

    Read the article

  • understanding syb boilerplate elimination

    - by Pradeep
    In the example given in http://web.archive.org/web/20080622204226/http://www.cs.vu.nl/boilerplate/ -- Increase salary by percentage increase :: Float -> Company -> Company increase k = everywhere (mkT (incS k)) -- "interesting" code for increase incS :: Float -> Salary -> Salary incS k (S s) = S (s * (1+k)) how come increase function compiles without binding anything for the first Company mentioned in its type signature. Is it something like assigning to a partial function? Why is it done like that?

    Read the article

  • passing javascript value in html url link

    - by pradeep
    $.post("/diabetes/ropimages/getcount.php",{pid:$("#patient_id").val()} ,function(data1){ //alert(data1); var count = data1; var pid = $("#patient_id").val(); var rid; for( var i = 1 ; i <= count ; i++) { var link ='<img src="/diabetes/ropimages/thumbpicdisplay.php?pid=+pid+&rid=1" />'; $("#content1").empty().html(link); } }); i am trying to pass pid value in url ..but its taking directly as +pid+ as value ..how do i give it the value of pid. and how do i print 3 images in a div ? like the one in code

    Read the article

  • can this keyword be used in an abstract class in java

    - by Reddy
    I tried with below example, it is working fine. I expected it to pick sub-class's value since object won't be created for super class (as it is abstract). But it is picking up super class's field value only. Please help me understand what is the concepts behind this? abstract class SuperAbstract { private int a=2; public void funA() { System.out.println("In SuperAbstract: this.a "+a); } } class SubClass extends SuperAbstract { private int a=34; } I am calling new SubClass.funA(); I am expecting it to print 34, but it is printing 2.

    Read the article

  • What does 'MGMTCLASS' of a dataset describe?

    - by Raja Reddy
    While allocating a dataset, What does MGMTCLASS of a dataset describe? To my knowledge it gives the retention and expiration period that it is gonna reside on disk and the possible values I have observed are BKUP35, NOBKNLIM etc. What are these stand for and what else are the possible value for this parameter? Hope I put my question exactly, please lemme know if i missed something...

    Read the article

  • How to get only the date from the sql server

    - by Pradeep
    this is what i want. but i have put only a specified date. SELECT BookName, Author, BookPrice FROM Book WHERE Book.Book_ID = ( SELECT Book_ID FROM Temp_Order WHERE Temp_Order.User_ID = 25 AND Temp_Order.OrderDate='3/24/2010' ) this is the date function i used. but it takes the time also. how to stop it. please help me SELECT Book_ID, BookName,Author,BookPrice FROM Book INNER JOIN FavCategory ON Book.Category_ID = FavCategory.Category_ID WHERE FavCategory.User_ID = " + useridlabel.Text + " AND OrderDate = **GETDATE()**

    Read the article

  • can the keyword 'this' be used in an abstract class in java

    - by Reddy
    I tried with below example, it is working fine. I expected it to pick sub-class's value since object won't be created for super class (as it is abstract). But it is picking up super class's field value only. Please help me understand what is the concepts behind this? abstract class SuperAbstract { private int a=2; public void funA() { System.out.println("In SuperAbstract: this.a "+a); } } class SubClass extends SuperAbstract { private int a=34; } I am calling new SubClass.funA(); I am expecting it to print 34, but it is printing 2.

    Read the article

  • stars and slideshow input not working in IE browsers

    - by pradeep
    http://ratingscorner.com/product_rating.php?alias=Rashtreeya-Vidyalaya-College-of-Engineering-Mysore-Road-Bangalore&product=colleges I have a page like this .this works very well in all browsers, but not in IE. problem in IE is that : 1. If you go to "your ratings" tab in second section. the stars and input are not clickable only. 2. and the gap between tabs and tables are more in IE .. tried to check in firebug also. the element has not margin or padding at bottom. the slideshow also does not work in IE

    Read the article

  • Need to split a string into two parts in java

    - by Reddy
    I have a string which contains a contiguous chunk of digits and then a contiguous chunk of characters. I need to split them into two parts (one integer part, and one string). I tried using String.split("\D", 1), but it is eating up first character. I checked all the String API and didn't find a suitable method. Is there any method for doing this thing?

    Read the article

  • Pessimistic locking is not working with Query API

    - by Reddy
    List esns=session.createQuery("from Pool e where e.status=:status "+ "order by uuid asc") .setString("status", "AVAILABLE") .setMaxResults(n) .setLockMode("e", LockMode.PESSIMISTIC_WRITE) .list(); I have the above query written, however it is not generating for update query and simultaneous updates are happening. I am using 3.5.2 version and it has a bug in Criteria API, is the same bug present in query API as well or I am doing something wrong?

    Read the article

  • jquery load function not working

    - by pradeep
    function newPage(pagenum) { /* load page default from server - pass product name */ $('#data').html("<div id='response'>Loading.....</div>").load( '/college/college_change.php', { product:'college', city:"<?php echo $city ?>", university:"<?php echo $university ?>", programmes:"<?php $programmes ?>", type:"<?php echo $type ?>", entrance_exams:"<?php echo $entrance_exams ?>", pagenum:pagenum }); } I am using this load function, it works well in most browsers, but in IE it does not load the data.

    Read the article

  • firefox does not load large size images

    - by Pradeep
    I am stuck with a kind of bug in FF, wherein it’s unable to load images of big size (I have 8 MB size of image) from the server. The loading of image is all fine on IE. I am still looking out for ways to get rid of this problem. I changed server(IIS) settings to allow bigger file sizes. Also, I used “load” event on image using JQuery and tried all sort of options listed here http://api.jquery.com/load-event/, but nothing worked so far. If anyone of you has come across any such similar problem, and a way to resolve it, it would be nice to hear from you Please note: high resolution images are part of the requirement. Code : <style> img { background-color: #FFFFFF; background-image: url(http://eremurus.hyd:8080/QMS/plugin/imagepanner/loader.gif); background-repeat: no-repeat; background-position: center center; } </style> <script src="../plugin/jquery-ui-1.8.7.custom/js/jquery-1.4.4.min.js" type="text/javascript"></script> <script> jQuery(document).ready(function($){ ///var _url = "http://eremurus.hyd:8080/QMS/plugin/imagepanner/floorPlan.jpg"; // set up the node / element _im =$("#main"); //_im.bind("load",function(){ $(this).fadeIn(); }); // set the src attribute now, after insertion to the DOM //_im.attr('src',_url); $("#main").one("load",function(){ alert('loaded'); }) .each(function(){ if(this.complete){ $(this).trigger("load"); } }); }); </script> </head> <body> <div id="target"><img id='main' src="http://eremurus.hyd:8080/QMS/plugin/imagepanner/floorPlan.jpg"> </img></div> </body> </html>

    Read the article

  • solving css validation errors

    - by pradeep
    http://validator.w3.org/check?uri=http%3A%2F%2Fratingscorner.com%2Fproduct_rating.php%3Falias%3DRashtreeya-Vidyalaya-College-of-Engineering-Mysore-Road-Bangalore%26product%3Dcolleges&charset=%28detect+automatically%29&doctype=Inline&group=0&ss=1&st=1&outline=1&No200=1&verbose=1 hi guys, i solved mots of my css errors . there are few errors which i am unable to fix. can some one please help me on it. 1.Warning Line 440, Column 1121: cannot generate system identifier for general entity "p" and similar errors 2.Error Line 113, Column 52: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag 3.Error Line 441, Column 37752: document type does not allow element "tfoot" here Error Line 440, Column 80: EntityRef: expecting ';'

    Read the article

  • change text color using jquery

    - by pradeep
    <input type='radio' name='specific_consultant' id='specific_consultant_no' value='no'>No</input> hii. i have a radio button like this . on click of this radio button , i need to change text color of text like No .. how do i do it..

    Read the article

  • How to delete a Dictionary row that is a Double by using an Int?

    - by Richard Reddy
    Hi, I have a Dictionary object that is formed using a double as its key values. It looks like this: Dictionary<double, ClassName> VariableName = new Dictionary<double, ClassName>(); For my project I have to have the key as the double as I require values like 1.1,1.2,2.1,2.2,etc in my system. Everything in my system works great except when I want to delete all the keys in a group eg all the 1 values would be 1.1,1.2, etc. I can delete rows if I know the full value of the key eg 1.1 but in my system I will only know the whole number. I tried to do the following but get an error: DictionaryVariable.Remove(j => Convert.ToInt16(j.Key) == rowToEdit).OrderByDescending(j => j.Key); Is there anyway to remove all rows per int value by converting the key? Thanks, Rich

    Read the article

  • Informix - Fetching Records from a table

    - by Pradeep
    Consider the below table Col1 Col2 Col3 123 ABC 20/5/2010 123 CDS 21/5/2010 123 VDS 22/5/2010 123 ABC 23/5/2010 123 VDS 24/5/2010 123 CDS 25/5/2010 123 ABC 26/5/2010 I need to fetch the first occurrence of CDS and calculate the time diff between the next row. Similarly I need to find out the next occurrence of CDS and calculate the time diff with the next row. This has to go on until there are no occurrences of CDS left in the table. Will be grateful if someone can help on this!!

    Read the article

  • jquery toggle did not work properly...

    - by pradeep
    function advanced_search() { $("#advanced_link").toggle( function(){ $('#advanced_link').text('Hide - Advanced Search'); $('.advanced_search').show(); }, function(){ $('#advanced_link').text('Show - Advanced Search'); $('.advanced_search').hide(); }); } this code worked for me..but when i tried to use the css property like function advanced_search() { $("#advanced_link").toggle( function(){ $('#advanced_link').text('Hide - Advanced Search'); $('.advanced_search').css('display','inline'); }, function(){ $('#advanced_link').text('Show - Advanced Search'); $('.advanced_search').css('display','none'); }); } it did not work...is there any thing wrong in second code...??

    Read the article

  • default loading problem

    - by pradeep
    hi, i am working on a site. where in i use tables. when i load the page for 1st time the table seems to be cluttered, but when i refresh the page again, its align itself properly.dono how do i solve this issue.i am proving the sample link URL please provide some help.

    Read the article

  • How can i target all the Mobile Devices with the single Asp.net mobile application?

    - by nagender-reddy
    Hi All, I am creating ASP.net mobile application i am targeting all the mobile devices Is this possible with the single application or not because some phones will support wml, HTML, CHTML or XML scripting languages. How can target all the devices with the single application & can i change the DeviceSpecific Filter option dynamically or not. If i change that dynamically is it reflect in the application? Thanks

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10  | Next Page >