February 9, 2016 asvignesh
Setup a Virtual Host on WAMP Most developers do work locally, Like them i work locally, test then deploy to staging / production. Sometime i used to work on WAMP stack too… in this case creating virtual hosts is better option V-Hosts makes URL cleaner, no need of much modifications in case of CMS let’s setup a virtual host in WAMP. Open your Apache configuration Default Location : C:\wamp\bin\apache\apache2.4.9\conf Search for “Virtual hosts” Uncomment the Include line if it is commented Virtual Host Config File Include Now update the Virtual host config file Sample vHost config <VirtualHost *:80>…
August 27, 2015 asvignesh
You can write the power shell modules through scripts (Script Modules) or through c# code (Binary modules) Script modules can have any valid PS code and save as .psm1 Binary modules can be any assembly that contain cmdlet classes (.dll) the assembly would be imported to powershell and use the commands In this post am writing about the how to create a Binary PowerShell module Open Visual Studio 2012 New Project -> Class Library In order to get the powershell runspace inside the programming language and to create the powershell commands we must add reference of “System.management.automation” dll The DLL…
August 8, 2015 asvignesh
I’ve been developing an automation scripts to provision and expand VMFS Datastore. Expand not Extent… I increased the storage volume size and need to increase the size of VMFS datastore without affording the downtime Here is the VIjava / YAVI Java code for expanding the datastore https://gist.github.com/cd02090562b8cf2ee0e3   [[Amazon_Link_Text]]
May 28, 2015 asvignesh
When i was working on a WIX, i encountered some issue in installing the application  (REST based webservice), my service is not started and later identified that the port number which i set in the application is already used by another application To identify whether the port is in use, i used the Socket Class in Java, which is an endpoint for communication between two machines but i used for local machine to validate specified port public Socket(String host, int port) throws UnknownHostException, IOException https://gist.github.com/c830a8f4c94fa17d68a8 if the host is null it will set the host as loopback address
May 27, 2015 asvignesh
When I write blogs which explains something using code snippet, i used to add the code directly and blockquote it later i find some plugins which will render the code in the readable format with syntax highlighting, later i used to add code snippet in GIST and embed in post using some plugins, recently i got a chance to read this post  Which lets you to embed the GIST code in your blog post without any additional plugins with simple steps Login to WP_admin In WordPress admin console Goto Appearance > Editor > Select the current theme and click on functions.php Paste the below code snippet to your WordPress…
May 24, 2015 asvignesh 1Comment
Usually we register the dll to the Global Assembly Cache a.k.a GAC using the Visual Studio developer console Gacutil or earlier to Windows server 2012 you can simply drag and drop to the Windows Assembly folder With the Windows server 2012 drag and drop the file to the assembly folder will no longer work In this scenario developer can use Powershell To add DLL to the Global Assembly Cache Run the powershell PS C:\Users\Vignesh> [System.Reflection.Assembly]::Load(“System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”) GAC    Version        Location —    ——-        ——– True   v4.0.30319     C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50… PS C:\Users\Vignesh> $publish = New-Object System.EnterpriseServices.Internal.Publish PS C:\Users\Vignesh> $publish.GacInstall(“C:\Users\Vignesh\bin\asvignesh.dll”); To remove DLL from the Global Assembly Cache (Unregister) Run…
October 8, 2013 asvignesh 6Comment
All the modern browser or mobile apps support a placeholder for the text input field. once you click on it the focus move to the beginning of the text and the placeholder remain until you start typing. To achieve this using Flex , Actionscript <mx:Script><![CDATA[ private var sampleText_text:String = “Enter Name”;   protected function sampleText_initializeHandler(event:FlexEvent):void   {   //For Place Holder for sampleText   sampleText.addEventListener(FocusEvent.FOCUS_IN , focusin);   sampleText.addEventListener(FocusEvent.FOCUS_OUT,focusout);     }   //fire when click to edit   public function focusin( event:Event ) : void   {   if(sampleText.text == sampleText_text)   {   sampleText.text = “”;   }   }   //fire when you clicked out   public function focusout(event:Event):void   {   if(sampleText.text == “”)…
June 18, 2013 asvignesh
There are lots of way to check whether the var is array or not but the easiest way is using instanceof Array Example 1 : var myName=[“Vignesh”,”A”,”Sathiyanantham”]; if (myName instanceof Array) { alert(myName is Array!’); } else { alert(‘myName Not an array’); } This will return you myName is Array! Example 2: var myName=”Vignesh A Sathiyanantham”; if (myName instanceof Array) { alert(myName is Array!’); } else { alert(‘myName Not an array’); } This will return you myName Not an Array! You can write a function to make it reusable function ismyvararray(myVar) {  return (myVar instanceof Array); } This will return…
April 14, 2013 asvignesh
We can submit the html form page by pressing submit button and the shortcut way is pressing enter ( return ) button on keyboard after filling up the form Here is the post to explain how to submit a form by pressing enter button using jQuery Generally, a form is submitted when the user presses a submit button. However, sometimes, you may need to submit the form when the user press return key ( enter key) Here is the code to submit the form by pressing the enter key <html> <head> <script src=”https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js”></script> <script> function formSubmit() { document.getElementById(“frm1”).submit(); } $(‘#submit_form’).keypress(function…