Monday, 17 April 2017

add ip for phpmyadmin

/etc/phpmyadmin$ sudo vim
/* Advance to next server for rest of config */
    $cfg['Servers'][$i]['verbose'] = 'Anil DB Magic2';
    $cfg['Servers'][$i]['host'] = 'XXX.XXX.X.XXX';
    $cfg['Servers'][$i]['port'] = '';
    $cfg['Servers'][$i]['socket'] = '';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['Servers'][$i]['AllowNoPassword'] = false;

Monday, 27 March 2017

ckeditor for multiple id

var editor_config = {
    toolbar: [
        {name: 'basicstyles', items: ['Bold', 'Italic']},
        {name: 'paragraph', items: ['BulletedList']}
    width: "210px",
    height: "140px"

CKEDITOR.replace('dsi3', editor_config );
CKEDITOR.replace('dsi4', editor_config );
CKEDITOR.replace('dsi5', editor_config );
CKEDITOR.replace('dsi6', editor_config );

Wednesday, 28 December 2016

footer alway on bottom


  $(document).ready(function() {

   var docHeight = $(window).height();
   var footerHeight = $('footer').height();
   var footerTop = $('footer').position().top + footerHeight;

   if (footerTop < docHeight) {
    $('footer').css('margin-top', 10+ (docHeight - footerTop) + 'px');

Saturday, 24 September 2016

what happens when you type in a URL in browser

In an extremely rough and simplified sketch, assuming the simplest possible HTTP request, no proxies, IPv4 and no problems in any step:
  1. browser checks cache; if requested object is in cache and is fresh, skip to #9
  2. browser asks OS for server's IP address
  3. OS makes a DNS lookup and replies the IP address to the browser
  4. browser opens a TCP connection to server (this step is much more complex with HTTPS)
  5. browser sends the HTTP request through TCP connection
  6. browser receives HTTP response and may close the TCP connection, or reuse it for another request
  7. browser checks if the response is a redirect or a conditional response (3xx result status codes), authorization request (401), error (4xx and 5xx), etc.; these are handled differently from normal responses (2xx)
  8. if cacheable, response is stored in cache
  9. browser decodes response (e.g. if it's gzipped)
  10. browser determines what to do with response (e.g. is it a HTML page, is it an image, is it a sound clip?)
  11. browser renders response, or offers a download dialog for unrecognized types

Friday, 23 September 2016

send tceditor data with ajax

                 for ( instance in CKEDITOR.instances ) {

Thursday, 18 August 2016

python first webapp program

1 - create folder : mkdir myfirstapp
2-  pip install lpthw.web (install commond)
3 . create init file ( touch
4. create app file
import web

urls = (
  '/', 'index'

app = web.application(urls, globals())

class index:
    def GET(self):
        greeting = "Hello World"
        return greeting

if __name__ == "__main__":

5 - save file and run

open webbrowser
put on url :-localhost:8080
Output :-
Hello World


Tuesday, 15 March 2016

remove empty field from input

 function submitFormManual(){
        //get name search form
        var SearchForm = $("#propertyFilertForm");
         SearchForm.find('input[name], select[name]').each(function(){
            if (!$(this).val()){
         //form submit