Search Results

Search found 9 results on 1 pages for 'lavanyadeepak'.

Page 1/1 | 1 

  • A Gentle .NET touch to Unix Touch

    - by lavanyadeepak
    A Gentle .NET touch to Unix Touch The Unix world has an elegant utility called 'touch' which would modify the timestamp of the file whose path is being passed an argument to  it. Unfortunately, we don't have a quick and direct such tool in Windows domain. However, just a few lines of code in C# can fill this gap to embrace and rejuvenate any file in the file system, subject to access ACL restrictions with the current timestamp.   using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace LavanyaDeepak.Utilities { class Touch { static void Main(string[] args) { if (args.Length < 1) { Console.WriteLine("Please specify the path of the file to operate upon."); return; } if (!File.Exists(args[0])) { try { FileAttributes objFileAttributes = File.GetAttributes(args[0]); if ((objFileAttributes & FileAttributes.Directory) == FileAttributes.Directory) { Console.WriteLine("The input was not a regular file."); return; } } catch { } Console.WriteLine("The file does not seem to be exist."); return; } try { File.SetLastWriteTime(args[0], DateTime.Now); Console.WriteLine("The touch completed successfully"); } catch (System.UnauthorizedAccessException exUnauthException) { Console.WriteLine("Unable to touch file. Access is denied. The security manager responded: " + exUnauthException.Message); } catch (IOException exFileAccessException) { Console.WriteLine("Unable to touch file. The IO interface failed to complete request and responded: " + exFileAccessException.Message); } catch (Exception exGenericException) { Console.WriteLine("Unable to touch file. An internal error occured. The details are: " + exGenericException.Message); } } } }

    Read the article

  • A Good .NET Quiz ...

    - by lavanyadeepak
    A Good .NET Quiz ... Whilst casually surfing today afternoon I came across a good .NET quiz in one of the indian software company website. It is rather a general technology quiz than just a .NET quiz because it also contains options for the following technologies.   .NET PHP Javascript MySql Testing QTP English Aptitude General Knowledge Science HTML CSS All It also has the following levels for the Quiz:   Easy Medium Hard All   The URL of the quiz is as below: http://www.qualitypointtech.net/quiz/listing_sub_level.php

    Read the article

  • Akismet Personal Key Discovery

    - by lavanyadeepak
    Akismet Personal Key Discovery No sooner did I get my GWB account than when I toured around the various features I was glad to see an Akismet configuration feature there. Akismet is really a very excellent blog-friendly tool to keep off spam from entering the blogs. With Wordpress.com, Akismet is builtin. Now I learnt about the Non-Commerical Key that Akismet gives to non-profit blogs from the settings page of GWB and signed up for one too.

    Read the article

  • GWB -- Little More Interesting Info

    - by lavanyadeepak
    GWB -- Little More Interesting Info Whilst writing the post on 'Warming with GWB', I just recalled another historic entity often shortly known as GWB. It is in fact 'GWBasic' which we I started programming about fifteen years back way back in 1994 to 1995.   GWBASIC was actually a version of BASIC in the lines of BASICA from Compaq. Eventually it was absorbed into QBasic and QuickBasic suite of products. Just thought I would share this recollection too in this context.

    Read the article

  • Warming up with GWB ...

    - by lavanyadeepak
    Warming up with GWB ... I had been wishing to blog @GWB for a while but each time I try to register something or other preempted me away from it. On Saturday last I was little free and hence just thought I would sit and register for the same. Thanks to Jeff for helping me in setting up my account and starting to blog at GWB... I would endeavor to support through this platform active troubleshooting tips, problems and solutions to realtime business queries.

    Read the article

  • An alternative way to request read reciepts

    - by lavanyadeepak
    An alternative way to request read reciepts Sometime or other we use messaging namespaces like System.Net.Mail or System.Web.Mail to send emails from our applications. When we would need to include headers to request delivery or return reciepts (often called as Message Disposition Notifications) we lock ourselves to the limitation that not all email servers/email clients can satisfy this. We can enhance this border a little now, thanks to a new innovation I discovered from Gawab. It embeds a small invisible image of 1x1 dimension and the image source reads as recieptimg.php?id=2323425324. When this image is requested by the web browser or email client, the serverside handler does a smart mapping based on the ID to indicate that the message was read. We call them as 'Web Bugs'. But wait it is not a fool proof solution since spammers misuse this technique to confirm activeness of an email address and most of the email clients suppress inline images for security reasons. I just thought anyway would share this observation for the benefit of others.

    Read the article

  • Source Browsing in FireFox

    - by lavanyadeepak
    Source Browsing in FireFox Just casually observed this a few minutes back with my Mozilla Firefox 3.6.3. When you do a view source of any  page in Internet Explorer it just renders as editable inoperative HTML. However in Firefox the hyperlinks are shown clickable and active. When you click on any hyperlink the most obvious and expected output would be that the target page would appear in one of the new tab in the parent browser. However the View Source window refreshed with the HTML source of the new page. I believe this gesture of Firefox would help us to take a journey back into Lynx Text Browsing in a way.

    Read the article

  • Dreaded SQLs

    - by lavanyadeepak
    Dreaded SQLs We used to think that a SQL statement without a where clause is only dangerous right since running that on a server TSQL is just going to impact the entire table like waving the magic wand. For that reason we should cultivate the habit first to write the statement as select and then to modify the select portion as update. Within the T-SQL Window, I would normally prefer the following first: select * from employee where empid in (4,5) and then once I am satisfied with the results, I would go ahead with the following change: --select * delete from employee where empid in (4,5) Today I just discovered another coding horror. This would typically be applicable in a stored procedure and with respect to variable nomenclature. It is always desirable to have a suitable nomenclature for parameters distinct from the column names and internal variables. This would help quicker debugging of the stored procedures besides enhancing the readability. Else in a quick bout of enthusiasm a statement like   if (@CustomerID = @CustomerID) [when the latter is intended to denote the column name and there is a superflous @ prepended], zeroing in on the problem would be little tricky. Had there been a still powerful nomenclature rules then debugging would have been more straight-forward and simpler right?

    Read the article

  • Online Syntax Colorizer

    - by lavanyadeepak
    Online Syntax Colorizer For those of us who share code snippets along with articles the most daunting problem would be to preserve the syntax colorizations. There are a few ways to manage through this additional requirements: Tweak and point the color picker in the article textearea. Import the code to a word processor and then copy the code. However, the word processor would unnecessarily swell the contents with too much of formatting contents. Quick Online Colorizer: http://tohtml.com/ (This supports a lot of languages including autodetection). I would also recommend if GWB could link to this website and auto-colorize the code when we paste it in our articles.

    Read the article

1