Monday, April 1, 2019

SQL Developer Cheat Sheet

To copy result with header:
Select all - Ctrl + A
Copy with header - Ctrl + Shift + C

To set the date time on date field:
alter session set nls_date_format='DD-MM-YYYY HH24:MI:SS';

Wednesday, February 27, 2019

Default boostrap hex colors

// Colors
$blue:    #007bff !default; // primary
$indigo:  #6610f2 !default;
$purple:  #6f42c1 !default;
$pink:    #e83e8c !default;
$red:     #dc3545 !default; // danger
$orange:  #fd7e14 !default;
$yellow:  #ffc107 !default; // warning
$green:   #28a745 !default; // success
$teal:    #20c997 !default;
$cyan:    #17a2b8 !default; // info

// Grays
$white:    #fff !default;
$gray-100: #f8f9fa !default; // light
$gray-200: #e9ecef !default;
$gray-300: #dee2e6 !default;
$gray-400: #ced4da !default;
$gray-500: #adb5bd !default;
$gray-600: #868e96 !default; // secondary
$gray-700: #495057 !default;
$gray-800: #343a40 !default; // dark
$gray-900: #212529 !default;
$black:    #000 !default;

Tuesday, February 26, 2019

Check account details on the domain

Open windows command prompt
type the following
net user [userid] /domain

It will show you the details of the account.

Thursday, February 11, 2016

Angular radio button in ng-repeat

When creating radio button in ng-repeat, only the last row gets checked.
It could be because of the name.
You can use the property ng-attr-name with your data in ng-repeat.
Reference here

Thursday, November 26, 2015

Telnet is not recognized as windows command

There are 2 things that you can do.
1) Install Telnet from the Windows feature
Go to Start -> Control Panel -> Programs -> Turn Windows feature on or off
Under feature section, find Telnet client ensure that it's ticked (if it's not).
Once (1) is installed, if you still encounter telnet is not recognized error, you can proceed with (2)

2) Go to Environment variables
Right click on my computer, select Properties, on the left side select Advanced System Settings.
Under Advanced tab, click Environment Variables, under System variables section, find the Variable = Path, ensure that C:\Windows\System32 is there. If it's not there, just append it.
Then click OK.

You should be able to run telnet commands now.

Monday, June 8, 2015

Wednesday, June 3, 2015

jquery to obtain the ID or to use the data.

To access data/id from html

in html form let say it's a button, we can put any fields as the data (by putting the tag data-<something>)

<input class="myclass" data-myvalue="myValue123" id="myID" type="button" />

To access the element using ID from the javascript:
$('#myID').click(function(e){
   var myvalue = $(this).data('myvalue');
});

To access the element using the class from javascript:
$('.myclass').click(function(e){
   var myvalue = $(this).data('myvalue');
   var myID = $(this).attr('id');
});