Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

Anurag Sinha V

@Anurag Sinha V
About
Posts
21
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • exception of type 'system.outofmemoryexception' was thrown
    A Anurag Sinha V

    Hey, How many records do you have in your excel file? Are they too much, I mean System.OutOfMemoryException hits when there is not much memory left for the application? have a look at your excel and see whether you can optimize it.. -Anurag

    ASP.NET help question

  • working out a triangle hypotenuse
    A Anurag Sinha V

    Its basic maths buddy.. :) Let me try to write a simple app for you. Distance between points (5,5) and the origin (0,0) should be: public CalculateDistance() { double D; int x1=5; int x2=0; int y1=5; int y2=0; D=Math.Abs(((x1-x2)^2)+((y1-y2)^2))^(1/2); Console.WriteLine(D); Console.ReadKey(); } The above should do good. -Anurag

    C# csharp question

  • working out a triangle hypotenuse
    A Anurag Sinha V

    Feels like you need to find out the distance between 2 points on a 2D plane. Point A (x1,y1) Point B (x2,y2) Distance between them would be=[((x1-x2)^2)+((y1-y2)^2)]^(1/2) Use Math.Abs method to get the absolute value of the distance regardless of x1>x2 or x1

    C# csharp question

  • how to clear session and cache of chrome browser when logout clicks in asp.net
    A Anurag Sinha V

    try Session.RemoveAll();

    ASP.NET csharp asp-net tutorial

  • About application
    A Anurag Sinha V

    What do you mean by online in MacBook and offline in desktop? there are 2 kinda apps: Desktop apps and Web apps... Both are pretty different.. Can you first decide what kinda app you wana do?

    ASP.NET database help

  • how can i run youtube vedio on my asp.net webpages
    A Anurag Sinha V

    hey..u cn use iframe tags in your aspx page and try to play a youtube vid..smthing like below: have a try.. regards

    ASP.NET csharp asp-net question

  • query error
    A Anurag Sinha V

    select COUNT(Category_name) from TableName where Category_name like '%SearchPrefix%'

    Database database help question

  • Competition winners
    A Anurag Sinha V

    Thank you.. My article got 7th place...:) regards anurag

    The Lounge database tutorial question

  • Competition winners
    A Anurag Sinha V

    It shows only the winners... Any other link where we could see the final standings?

    The Lounge database tutorial question

  • Competition winners
    A Anurag Sinha V

    Hello People, Well this query might be a little weird, but how to know who won the monthly competitions held over here at CP. My article was in bid for the Best Web Dev article, for which voting ended on 19th April. I am pretty sure my article wouldn't have won..:) But trying to find out as to what position it eventually landed at?? If this is not the correct forum to post this kind of query, please advise accordingly. regards Anurag

    The Lounge database tutorial question

  • Android Development
    A Anurag Sinha V

    hi, every single information is available on developer.android.com you can refer to it quite easily.

    cheers

    Mobile help android performance

  • how to get difference between 2 dates in years:months format?
    A Anurag Sinha V

    hi all..have found the solution to the problem above posted by me..thxx evryone fr their suggestions..will post the answer sometime...

    C# question csharp help tutorial

  • how to get difference between 2 dates in years:months format?
    A Anurag Sinha V

    thanks a lot everybody for the responses.. will do evrything what is required to crack it...

    C# question csharp help tutorial

  • how to get difference between 2 dates in years:months format?
    A Anurag Sinha V

    hi Richard..thxx for the suggestion..i did try Math.Abs stuff but still not getting the desired result... The conversion into months in negative scenario is what I am not getting.. Further assistance would be highly appreciated..

    Regards Anurag

    C# question csharp help tutorial

  • how to get difference between 2 dates in years:months format?
    A Anurag Sinha V

    Hi all, AM working on a C# project.. my requirement is as follows: there are 2 dates viz date1 & date2. if date1 > date2 the difference should come as e.g (3years,2months) if date1 < date2 the difference should come as e.g (-3years,-2months) I am able to get the first scenario but the second scenario I am having problems with, not able to calculate the number of months in negative quite correctly... Below is the code used in case of positive scenario,currentdate is alwys greater than the assetCapDate passed as a value: public string newmethod(string assetCapDate) { string timeStr = string.Empty; int years = 0; int months = 0; int days = 0; TimeSpan ts = new TimeSpan(); System.DateTime date1 = DateTime.Now; System.DateTime date2 = Convert.ToDateTime(assetCapDate); ts = date1.Subtract(date2); years = (ts.Days/365); do { for(int i=0; i <= 12; i++) { if(date1.Subtract(date2.AddYears(years).AddMonths(i)).Days >=0) { months = i; } else { break; } } if(months > 12) years = years + 1; }while(months > 12); days = date1.Subtract(date2.AddYears(years).AddMonths(months)).Days; if (years > 0) { timeStr += years.ToString() + " Years, "; } if (months > 0) { timeStr += months.ToString() + " Months"; } if (days > 0) { timeStr += days.ToString() + " Days"; } return(timeStr); } Any help would be highly appreciated. I am not sure whether this question falls under C# domain..Moderators please advise accordingly..will move this question to another domain if required.

    Regards Anurag

    C# question csharp help tutorial

  • how to insert default signature in Outlook using Javascript
    A Anurag Sinha V

    Have moved this question to the Javascript section....

    Web Development javascript com help tutorial

  • how to get default signature in outlook using Javascript
    A Anurag Sinha V

    Hi All, Have a code which sends an Outlook mail using Javascript by creating an instance of ActiveX object. I need the functionality to be such, when the user executes this code his default signature should also be added in the mail...Have tried it but to no avail..Any help would be highly appreciated... The code goes as follows for the reference:

    function mailWindowOpen(mailBody) {
    outlookApp = new ActiveXObject("Outlook.Application");
    var nameSpace = outlookApp.getNameSpace("MAPI");
    mailFolder = nameSpace.getDefaultFolder(6);
    mailItem = mailFolder.Items.add('IPM.Note.FormA');
    mailItem.Subject = "Hi There!!!";
    mailItem.HTMLBody = mailBody;

     mailItem.display(0);
    

    }

    mailBody is passed as a parameter from an aspx page, which has the Page.ClientScript.RegisterStartScript command to call this Javascript function...

    -Anurag

    JavaScript javascript com help tutorial

  • how to insert default signature in Outlook using Javascript
    A Anurag Sinha V

    Is it the correct domain or should I post this question in Javascript section??? Moderators please advise...

    Web Development javascript com help tutorial

  • how to insert default signature in Outlook using Javascript
    A Anurag Sinha V

    Hi All, Have a code which sends an Outlook mail using Javascript by creating an instance of ActiveX object. I need the functionality to be such, when the user executes this code his default signature should also be added in the mail...Have tried it but to no avail..Any help would be highly appreciated... The code goes as follows for the reference:

    function mailWindowOpen(mailBody) {
    outlookApp = new ActiveXObject("Outlook.Application");
    var nameSpace = outlookApp.getNameSpace("MAPI");
    mailFolder = nameSpace.getDefaultFolder(6);
    mailItem = mailFolder.Items.add('IPM.Note.FormA');
    mailItem.Subject = "Hi There!!!";
    mailItem.HTMLBody = mailBody;

     mailItem.display(0);
    

    }

    mailBody is passed as a parameter from an aspx page, which has the Page.ClientScript.RegisterStartScript command to call this Javascript function...

    -Anurag A curious newbie

    Web Development javascript com help tutorial

  • Not able to drag and drop WPF controls on to window in Visual Studio 2008
    A Anurag Sinha V

    hii..got around the problem by upgrading the .net framework 3.5 to SP1..now i am able to drag and drop other controls...however, a new problem persists..I am not able to customize the toolbox though..i right clicked on the toolbox area and clicked on choose items..then a dialog box appears with various menus..clicked on 'WPF components'..chose the controls which i needed and then clicked on OK..but to my surprise the controls were not added...tried it again 2-3 times but to no success..restarted VS again and repeated the whole procedure but couldn't do it...Please help..

    Anurag A curious newbie

    WPF csharp wpf css visual-studio
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups