Sunday, November 29, 2020

Start WebLogic Server

 

From a command prompt, go to [appserver root]/user_projects/domains/[appserverdomain].

Enter the following command:

> (Windows) startWebLogic.cmd

> (Linux, UNIX) ./startWebLogic.sh



Weblogic

 

  1. Start WebLogic Server


Thursday, September 3, 2020

How clear Oracle 11g listener log on windows

 

How clear Oracle 11g listener log on windows

  1. Find your listener log file at E:\app\Administrator\diag\tnslsnr\STAGING-SERVER\listener\trace        
  2. Backup your listener.log (use command prompt is preferable)

3) Clear your listener.log (use command prompt is preferable)

4) Stop your listener


5) Start your listener



Monday, July 20, 2020

Change parsley error container position



Change the container with DOM attributes
In cases where you only have one input (or group of inputs, like you do) and you want to change the container of the errors on those inputs, you can use data-parsley-errors-container="#element"
<fieldset>
    <label class="checkbox-inline">
        <input type="checkbox" id="inlineCheckbox1" required data-parsley-maxcheck="2" data-parsley-multiple="checkbox2" value="option1" data-parsley-errors-container="#checkbox-errors" /> 1
    </label>
    <label class="checkbox-inline">
        <input type="checkbox" id="inlineCheckbox2" data-parsley-maxcheck="2" data-parsley-multiple="checkbox2" value="option2" /> 2
    </label>
    <label class="checkbox-inline">
        <input type="checkbox" id="inlineCheckbox3" data-parsley-maxcheck="2" data-parsley-multiple="checkbox2" value="option3" /> 3
    </label>

    <div id="checkbox-errors"></div>
</fieldset>
Credit to: https://stackoverflow.com/questions/21702476/parsley-js-change-error-container

Parsley Js


  1. Change parsley error container position
  2. Dynamically add and remove form fields to be validated by Parsley.js

Friday, July 17, 2020

Access append element using JQuery


$(document).ready(function(){
  $('body').on('click', '#yourelementid', function() {
     alert("click");
  });
});

Thursday, April 30, 2020

Change Laravel built-in development web server document root



> php -S localhost:8080 -t "D:\xampp72\htdocs\laravel-web"

* -t = Specify document root <docroot> for built-in web server

Thursday, March 5, 2020

Creating new table with SELECT statement



The syntax for creating a new table is
CREATE TABLE new_table
AS
SELECT *
  FROM old_table
This will create a new table named new_table with whatever columns are in old_table and copy the data over. It will not replicate the constraints on the table, it won't replicate the storage attributes, and it won't replicate any triggers defined on the table.
SELECT INTO is used in PL/SQL when you want to fetch data from a table into a local variable in your PL/SQL block.

Thursday, January 30, 2020

Submit all pages form data



Submit form:
$(document).ready(function (){
   var table = $('#example1').DataTable({
      pageLength: 4
   });

   // Handle form submission event
   $('#frm-example1').on('submit', function(e){
      var form = this;

      // Encode a set of form elements from all pages as an array of names and values
      var params = table.$('input,select,textarea').serializeArray();

      // Iterate over all form elements
      $.each(params, function(){
         // If element doesn't exist in DOM
         if(!$.contains(document, form[this.name])){
            // Create a hidden element
            $(form).append(
               $('<input>')
                  .attr('type', 'hidden')
                  .attr('name', this.name)
                  .val(this.value)
            );
         }
      });
   });
});

Submit through ajax:
$(document).ready(function (){
   var table = $('#example2').DataTable({
      pageLength: 4
   });

   // Handle form submission event
   $('#frm-example2').on('submit', function(e){
      // Prevent actual form submission
      e.preventDefault();

      // Serialize form data
      var data = table.$('input,select,textarea').serializeArray();

      // Include extra data if necessary
      // data.push({'name': 'extra_param', 'value': 'extra_value'});

      // Submit form data via Ajax
      $.post({
         url: 'echo_request.php',
         data: data
      });
   });
});
* Credit to https://www.gyrocode.com/articles/jquery-datatables-how-to-submit-all-pages-form-data/

Tuesday, January 21, 2020

Count checked checkbox in jquery datatables pagination



var chbCheckCount =  $(':input[type="checkbox"]:checked', tbl.rows().nodes()).length;

* tbl = datatables object

Submit dynamic checkbox in jquery datatable



$('#btnSubmit').click(function () {
  var postData = $('#frm').serialize();
  var idParam = $('#id').val();
  var url = "your_url.php";

  var tbl = $('#dtTable').DataTable();
  var dt = tbl.$('input[type="checkbox"]').serialize();
  var postData = dt+'&id='+idParam;

  $.ajax({
    method: "POST",
    url: url,
    data:postData,
  })
    .done(function(data) {
      var msg = jQuery.parseJSON(data);
      if(msg.status == 'success'){
        $('#modalPopup').modal('toggle');
      }else{
        alert('Failed! ' + msg.msg);
      }

    });
});