Tuesday, 15 July 2014

Change DB collation


ALTER DATABASE [Ratification] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;

GO

ALTER DATABASE [Ratification] COLLATE Arabic_CI_AS;

GO

ALTER DATABASE [Ratification] SET MULTI_USER;

GO

--[Ratification] IS THE db NAME

Wednesday, 28 May 2014

Oracle Commands




  • To connect from client use sqlplus and type (username/password@hostname/servicename(sid))
  • To list all tables names for the logged in user (select table_name from user_tables;)
  • To select cashed maps (select name from user_sdo_cached_maps;)

  • java.lang.OutOfMemoryError: Java heap space; It means Map builder requires more heap memory to load spatial data. To solve it.: Open the command line and start the Map Builder application as follows. java -jar -Xmx1024M D:\mapbuilder.jar





Sunday, 30 March 2014

Execute Huge SQL Script File through SQLCM



Run Command Prompt as Administrator and cd in the folder which contains the DB script file

sqlcmd -S ServerName -d dataBaseName -i scriptFile.sql -o outputFile.txt

Thursday, 27 February 2014

CSS




3 major CSS weaknesses
  •  Lack of essential basic features
  • Hard to maintain (huge messy CSS files)
  • Not DRY enough - leads to mistakes
“Variables... finally!”

Less, Sass, Stylus

You have to use 

  • @ for less variables
  • $   for Sass
  • = for Stylus
Less, Sass, Stylus They don't enhance CSS, but improve your development workflow


$my_blue: #4e6cb0; // Sass
@my_blue: #4e6cb0; // Less
my_blue = #4e6cb0; // Stylus
$primary_color: $my_blue;
h1 {
color: $primary_color;
}

$fonts: Helvetica, Arial, sans-serif;
$images_path: "../img/"
$font-size: 1.5em;
$margin: 20px;
$width: 80%;


Color functions
$light_blue: lighten($my_blue, 20%);
$flashy_blue: saturate($my_blue, 50%);

Nesting
.link {
            &:hover {
                    }
}
// ======== OUTPUT ========
.link {}
.link:hover {}

Don't nest too much (4 levels max)

  • Sass is written in Ruby
  • Less and Stylus are written in JavaScript
- This does NOT mean you need Ruby or Node on your production server to use them.
- You need them on your 
development machine

Tuesday, 18 February 2014

To Delete Wireless Network Profile in a Command Prompt



This command will delete the wireless network profile
netsh wlan delete profile name="WirelessProfileName"



This command will give you a list of all wireless network profiles on your PC
netsh wlan show profiles

Sunday, 16 February 2014

Available Area Units in Oracle Spatial

Open oracle sql plus tool and run the following query,
 you will see the following results
select distinct short_name, unit_of_meas_name 
from sdo_units_of_measure 
where unit_of_meas_type = 'area'; 
short_name unit_of_meas_name
SQ_METER Square Meter
SQ_KM Square Kilometer
SQ_CM Square Centimeter
SQ_IN Square Inch
SQ_LI Square Link
SQ_CENTIMETER Square Centimeter
SQ_ROD Square Rod
PERCH Perch
ROOD Rood
USER-SQ-HALF-METER
SQ_M Square Meter
SQ_INCH Square Inch
HECTARE Hectare
ACRE Acre
SQ_FT Square Foot
SQ_KILOMETER Square Kilometer
SQ_CH Square Chain
SQ_MILE Square Mile
SQ_YARD Square Yard
SQ_MM Square Millimeter
SQ_LINK Square Link
SQ_SURVEY_FOOT Square Survey Feet
SQ_MILLIMETER Square Millimeter
SQ_CHAIN Square Chain
SQ_FOOT Square Foot

Tuesday, 11 February 2014

Export Oracle Databse to Dump file


login to database as sysdba


SQL> CREATE DIRECTORY dmpdir AS 'D:\dumpDire';

Directory created.

SQL> GRANT read, write ON DIRECTORY dmpdir TO sys;

Grant succeeded.

SQL> SELECT directory_path FROM dba_directories WHERE directory_name = 'DATA_PUM
P_DIR';

DIRECTORY_PATH
---------------------------------------------------------------------------

D:\oracle\app\admin\orcl\dpdump\


SQL>  $ expdp user/user@orcl DIRECTORY=dmpdir DUMPFILE=dumpFileName.dmp;