Login   Search
Skip Navigation Links
Home
Application Security Tips
Oracle , PL/SQL
IT Product Reviews
Project Management
Forum
Contact Us
Links & References
Avoid SQL Injection attack
Threats and Countermeasures: S.T.R.I.D.E
Input Validation
Session Management
Authentication Mechanism
Cross Site Scripting Vulnerabilities
Configuration Management
Scroll up
Scroll down
Oracle 9i - Programming basics PL/SQL
PL/SQL - Conditional Statements – IF
PL/SQL -Nested Block
LOOPS in PL/SQL
PL/SQL Records
Cursors in PL/SQL
PL/SQL Tables
PL/SQL Exceptions
PL/SQL Procedures
PL/SQL Functions
Oracle supplied packages
Packages
PL/SQL Ref Cursors
Types in Oracle PL/SQL
Varrays
Nested Table
Bfile and LOBs
Bulk Binding
Know Depandencies
PL/SQL Wrapper
Triggers
Scroll up
Scroll down
DBMS_SQL package
DBMS_DDL Package
DBMS_JOB Package
UTL_FILE Package
DBMS_METADATA Package
DBMS_PIPE Package
DBMS_SESSION Package
Scroll up
Scroll down

 

Blog

  • Imperativeness of agile methodology in software development
  • Get list of installed softwares on machines in your network
  • VMWare - Error - the vmware authorization service is not running
  • Add chart / graphs in ASP.net application / website
  • Microsoft Ramp Up

Blog

  • Review: uCertify.com: PrepKit for: 70-529 (C#)
  • Bird eye Review: uCertify.com: PrepKit for: 70-529 (C#)
Skip Navigation Links>Home

Welcome To 24x7 Code.com

It's about code..

Developers' resources, Source Codes ,  Quick reference guides, tutorials, Articles , knowledge base articles, useful products.
Collection of tutorial links for many programming languages
A website designed to help learning programming languages. Understandable programming tutorials, reviews, source code, tips and tricks.


 

Latest articles & Blog posts on 24x7code.com

24x7 Tag cloud
  • PMP
  • PDU
  • Project Management
  • Free
  • Oracle
  • Programming
  • Microsoft
  • WMI
  • VB Script
  • Tips & Tricks
  • C#
  • MSMQ
  • Code Samples
  • ASP.net
  • Learning
  • UI
  • Troubleshooting
  • Errors
  • Agile
Imperativeness of agile methodology in software development

 

There is a nice article on DevX about why to use Agile development.  This article starts with brief description of three main types software development methodologies [Waterfall, Cowboy Coding & Agile]

Further this article elaborates working of agile methodology. This includes sprint planning, execution using scrum, tight feedback loops etc.


Read complete article on http://www.devx.com/webdev/Article/45368

{8/19/2010 11:55 PM} {0 Comments}  {Tags: Project Management, Agile}
Get list of installed softwares on machines in your network

I was looking for a way to get list of softwares installed in machines in our network for verifying something. I did not wanted to go & login in each machine & then collection list of softwares from add / remove programs. 

So I decided to write a small program that will do this for me.

This is how we can do it. List that you see in add remove program is stored in Machine registry at path SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall  under local machine.

So your program will connect to registry of each machine specified & read the list. Then compile that list by removing list items such as Updates / Fixes etc as per requirement.

Below function will enumerate the softwares installed in a text file & also will display it on console application.

private static void WriteSoftwareListToFile(string MachineName , string ReportFileName)

{

StreamWriter sw;

if (File.Exists(ReportFileName))

{

sw = File.AppendText(ReportFileName);

}

else

{

sw = File.CreateText(ReportFileName);

}

sw.WriteLine("\r\nSoftwares installed on " + MachineName +

" on " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString());

//Registry path which has information of all the softwares installed on machine

string uninstallKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";

// using (RegistryKey rk = Registry.LocalMachine.OpenSubKey(uninstallKey))

sw.WriteLine("\r\nSoftware Name \t Software Version");

try

{

using (RegistryKey rk =

RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, MachineName).

OpenSubKey(uninstallKey))

{

foreach (string skName in rk.GetSubKeyNames())

{

using (RegistryKey sk = rk.OpenSubKey(skName))

{

string SoftwareName = string.Empty;

string SoftwareVersion = string.Empty;

try

{

SoftwareName = sk.GetValue("DisplayName").ToString();

SoftwareVersion = sk.GetValue("DisplayVersion").ToString();

}

catch (NullReferenceException exNull)

{

SoftwareName = string.Empty;

SoftwareVersion = string.Empty;

}

if (SoftwareName != string.Empty)

{

//Exclude Updates , Fixes

if (!(SoftwareName.Contains("Security Update for Windows") ||

SoftwareName.Contains("Hotfix for") ||

SoftwareName.Contains("Update for") ||

SoftwareName.Contains("Update for Windows")))

{

Console.WriteLine(SoftwareName + " " + SoftwareVersion);

sw.WriteLine(SoftwareName + "\t" + SoftwareVersion);

}

}

}

}

}

}

catch (Exception Ex)

{

sw.WriteLine("\r\n Exception :" + Ex.Message);

}

sw.Close();

}

 

You can call this functions for all require machines in your network like below. Please note if you are running the application your domain ID need to have registry read access for all the machines your are accessing.

 

static void Main(string[] args)

{

string[] Machines = new string[]

{

"MachineHostName1",

"MachineHostName2",

"MachineHostName3",

"MachineHostName4",

"MachineHostName5",

"MachineHostName6" };

string FILE_NAME = "SoftwareList_" + DateTime.Now.ToShortDateString().Replace("/", "") + ".log";

for (int i = 0; i < Machines.Length; i++ )

WriteSoftwareListToFile(Machines[i], FILE_NAME);

Console.ReadLine(); // To make the o/p readable.

}

{1/25/2010 12:28 PM} {0 Comments}  {Tags: C#, Code Samples, Programming, Tips & Tricks}
VMWare - Error - the vmware authorization service is not running

I have windows vista home premium on my laptop. One day suddenly my VMWare started giving error "the vmware authorization service is not running " while starting virtual machine. I googled on internet & found KB Item on VMWare site    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1007131

It said, go to compute management & give admin rights to VMWare user & then reinstall the VMWare . Looks easy.  I started following steps . But wait.. where is familiar screen of user management.  Windows Vista Home Premium do not have provision to use GUI user management consol. Thats not fair !!

Google one more time & here you go. http://social.technet.microsoft.com/Forums/en/itprovistasecurity/thread/e3d50d7f-deba-4a79-b347-72ed3d14d940 

Lot of good information is mention on this thread about user management using command line. Use below command to list users on computer & get exact name of VMWareUser

> NET USERS  

Syntax for adding for adding or removing user from group is

NET LOCALGROUP <<groupname>> <<user name>> {/ADD | /DELETE}

So below command should give admin right to VMWare user

>NET LOCALGROUP Administrators __vmware_user__ /add

But Ooops !! Got an error.

System error 5 has occurred.

Access is denied.

I am logged in as admin user still why would I get this error ?  Okey.. this is access error so my command line console is not having enough rights . Thanks to Windows Vista's User Account Control

Now right click on Command Prompt Menu & Run it as an Administrator. Now I was able to add VMWare user to administrators group from command line.  I have not yet reinstalled the VMware but I am still getting the same error. "the vmware authorization service is not running ". To to try something more , I right clicked VMWare Workstation & Ran it as administrator. I was able to start my workstation .

:) that was simple ..

 

 

 

{1/19/2010 7:04 PM} {0 Comments}  {Tags: Tips & Tricks, Troubleshooting, Errors}
Add chart / graphs in ASP.net application / website

There are lots of commercial graph or chart controls for ASP.net. But if you are looking for free chart / graph components below mentioned components may be useful for your needs.

  • Zed Graph
    The best ever I could find is Zed Graph.
    It has nice features
    Free Source Code or Binaries can be downloaded from
    http://sourceforge.net/projects/zedgraph/

      There is a good tutorial available to use this component 
         http://www.codeproject.com/KB/graphics/zedgraph.aspx

         One simpler example for ZedGraph for ASP.net is available at Sailing Kay’s blog
            http://sailingkay.blogspot.com/2007/03/zedgraph.html

  • For very Simple HTML Graphs rendered via ASP.net.
    This is very simple horizontal bar chart. It dynamically creates html table with cells background color gives look of a bar chart.
    http://www.codetoad.com/asp.net_graph.asp

This article references to ASP.net 2.0 development.

 

{12/18/2009 3:51 PM} {0 Comments}  {Tags: ASP.net, C#, Code Samples, Free, Programming, UI}
Microsoft Ramp Up

Ramp Up is free community based learning program recently started by Microsoft.

Microsoft offers various learning tracks in this program.

  • Web Development with ASP.NET
  • Learn ASP.NET: for PHP Developers
  • Move from ASP to ASP.NET
  • Develop Windows Mobile 6 Applications
  • SharePoint for Developers - Part 1
  • SharePoint for Developers - Part 2
  • Visual Studio 2008
  • For the VS 2002/2003 Developer: Learn VS 2005
  • For the VB 6.0 Developer: Learn VB 2005
  • For the Java Developer: Learn .NET
  • Developer Basics

One can opt for any track depending on their background & start learning new Micrsoft technologies.

URL for Ramp Up program is http://msdn.microsoft.com/rampup 

{10/5/2009 2:02 PM} {0 Comments}  {Tags: Microsoft, Learning, Free}
1 2> >>|
Rss

Designed & Developed by Rahul Bagal