Thursday, January 19, 2012

Creating Flex/Java project with Eclipse Helios & Flash Builder 4 plugin

Not able to create a flex/java project with Flash builder 4 plug-in in Eclipse Helios version,
the work around is to use Eclipse Galileo and then open the project in Helios.

Eclipse Galileo/Helios Jboss6 setup

Eclipse Galileo/Helios does not have the JBoss 6 server adapter, so to make JBoss work from eclipse Galileo we need to download a plugin from http://www.cs.hs-rm.de/~knauf/public/index.html and copy it to the eclipse plugins folder.

MSDE Backup and Restore to SQLExpress 2005/2008


MSDE database backup and restore to MSQLExpress 2005/2008
  • To find out the databases in the MSDE run this command
    • OSQL -E –S SQLServerInstanceName –Q "SELECT name FROM sysdatabases"
  • To backup a specific database run this command
    • OSQL -U sa -P admin -S
                              
      Or
    • OSQL -E-S
    • BACKUP DATABASE dbname TO DISK = 'c:\path\to\backupfile.dat'
      Go
  • To restore a specific database run this command
    • RESTORE DATABASE newdb FROM DISK = 'c:\path\to\backupfile.dat' WITH REPLACE
      go

    • If that does not work, then you can enter the following statement as one continuous string, but follow the capitalizations and the spacing in the example.

      RESTORE DATABASE newdb FROM DISK = 'c:\path\to\backupfile.dat' WITH MOVE ' to 'c:\Program Files\Microsoft SQL
      Server\MSSQL$METRIX\Data\METRIXV120copy.mdf', MOVE 'to 'c:\Program Files\Microsoft SQL Server\MSSQL$METRIX\Data\METRIXV120copy.ldf'

       
    • To get the logical names run this command RESTORE FILELISTONLY FROM DISK = 'c:\path\to\backup.dat'

Quick Setup Instructions for MediaWiki


MediaWiki Setup Instructions.

  • Install Apache 2.2 or later 
  • Install Mysql 5 or later 
  • Install PHP from the zip version, just extract the files to a directory. The main directory should contain php5apache2.dll  and similar dll files. 
  • Setup PHP to work with MySqL by uncommenting the lines in php.ini file
    1. extension_dir="c:\php5.3.5\ext" 
    2. extension=php_mysql.dll

  • Setup PHP and Apache by adding these lines into httpd.conf
    1. LoadModule php5_module "c:/php5.3.5/php5apache2_2.dll"
    2. AddType application/x-httpd-php.php 
    3. PHPIniDir "C:/php5.3.5/"
    ** Note to change the Php installation directory to yours.

  • Create a database for the Wiki(dc_wiki_db), create a user/pwd and assign privileges for the user to this db. 
  • Download mediawiki latest version. 
  • Unzip the mediawiki zip file into the root directory of Apache, usually htdocs unless you have changed it. 
  • Navigate to the index.php file under the extracted mediawiki folder from the browser and follow the setup instructions. 
  • The installation will create a LocalSettings.php file under the root directory of mediawiki, this is the main configuration file for the mediawiki.

Tuesday, March 1, 2011

Adobe Flex Builder Plugin Installation in Eclipse Galileo and Helios

Install the plugin into either Galileo or Helios package.

To install it onto other version 
for ex: if you have installed on Galileo, navigate to dropins folder under eclipse Galileo
copy the link file com.adobe.flexbuilder.feature.core.nl1 to the dropins folder of Helios.

That's it, now the Adobe Flex builder plugin will work for Eclipse Galileo and Helios.

-Shankar

Tuesday, March 16, 2010

SQL Express Query results to csv with batch file

SQL Express management tool has limited functionality and it lacks the process of scheduling backups or any specific query tasks.

This particular example will execute a query and save it as *.csv file everyday.

//batch file start....


@echo off


set Today=%date:~10,4%%date:~4,2%%date:~7,2%
set Now=%time:~0,2%%time:~3,2%%time:~6,2%



sqlcmd -S localhost -d HistorianDB -E -Q "select recordnumber, name, timestamp, data from TrendLogView" -o "historianBkp-%Today%-%Now%.csv" -s"," -w600


cls
exit


//--end

Save this file with .batch extension and when executed creates a .csv file with datetime stamp. Now to automate this batch file execution you could use the windows scheduled task to do it.

Friday, August 21, 2009

Simple Eye Exercise

Eyes get strained by continuously looking at the computer screen and its worse for serious programmers who barely move away from the screen for hours.

A simple exercise I feel comfortable is to read every key of your keyboard slowly starting from the top row to the bottom.

-Shankar