Skip to content

Instantly share code, notes, and snippets.

View bablukpik's full-sized avatar
🏠
Working from home

Bablu Ahmed bablukpik

🏠
Working from home
View GitHub Profile
//Datatable Refresh
$('.dataTables').DataTable().ajax.reload();
// or
$('#example-select').on('change', function(){
$('#example').DataTable().ajax.reload();
});
//Destroy the old datatable
$('.dataTables').dataTable().fnDestroy();
What is sequence?
To generate sequential integers/numbers in database.
all sequences are maintain in system table called user_sequences;
desc user_sequences;
To check all sequences in the table as follows:
select sequence_name from user_sequences;
//Datatable
++++++++++++Datatable JS+++++++++++
$('#dataTable').DataTable(
{
"processing": true, // Show processing
"serverSide": true, // Server side processing
"ajax":{
url : '<?= route("dataProcessing")?>',
type : "POST",
@bablukpik
bablukpik / ReactJS
Last active September 12, 2017 11:02 — forked from sakukode/sublimetext.md
ReactJS
//Simple Application
<div id="myReactApp1"></div>
<div id="myReactApp2"></div>
<div id="myReactApp3"></div>
<script type="text/babel">
class Man extends React.Component {
render() {
return <h1>{"Name: "+this.props.name+", Age: "+this.props.age}</h1>
}
The top 3 JavaScript templating engines:
https://www.npmjs.com/package/underscore
https://www.npmjs.com/package/handlebars
https://www.npmjs.com/package/ejs
//v.01
//var express = require('express');
//var app = express();
var app = require('express')(); //server creation
Runtime vs Compile time:
-> In computer programming, event-driven programming is a programming paradigm in which the flow of the program is determined by events such as user actions (mouse clicks, key presses), sensor outputs, or messages from other programs/threads.
-> The source code must be compiled into machine code in order to become and executable program. This compilation process is referred to as compile time.(think of a compiler as a translator) A compiled program can be opened and run by a user. When an application is running, it is called runtime
-> In computer science, asynchronous I/O, or "Non-sequential I/O" is a form of input/output processing that permits other processing to continue before the transmission has finished. Input and output (I/O) operations on a computer can be extremely slow compared to the processing of data.
What is a CGI Script?
A CGI script is any program that runs on a web server.
//There is no window object like browser console. We can use like this as global.
-> A multidimensional array is an array containing one or more arrays. A two-dimensional array is an array of arrays (a three-dimensional array is an array of arrays of arrays).
//Array Functions:
array_pop() ->pops an element off end of the array.
array_push() ->pushes an element into the end of the array.
array_shift() ->pops an element off the beginning of the array.
array_unshift() ->pushes an element into the beginning of the array.
array_key_exists($key, $array2)
array_diff(array1,array2,array3...);
array_intersect($array1, $array2);
array_search("red",$a);
//Refresh particular element with jQuery
1. $("#printablediv").load(location.href + " #printablediv"); // Add space between URL and selector.
Or
$("#MainForm").load(location.href+" #MainForm", function() {
$(".select2").select2();
});
2. $('#showDetaildModalBody').load("<?php echo base_url('setup/OrganizationSetup/create')?>");
3. $("#find_gen_sdl").trigger("click");
4. Another Ajax Request inside Success Method
5. location.reload();
//JSON is a light-weight, language independent, data interchange format.
-> JSON Encode and Decode
-> JSON Encode:
->PHP json_encode() function is used for encoding JSON in PHP. Objects in PHP can be converted into JSON by using the PHP function json_encode().
i.e,
$myObj->name = "John";
$myObj->age = 30;
$myObj->city = "New York";
$myJSON = json_encode($myObj);
echo $myJSON;
@bablukpik
bablukpik / Linux
Last active February 12, 2019 07:35
What is Sheel?
-> Shell is a UNIX term for the interactive user interface with an operating system. The shell is the layer of programming that understands and executes the commands a user enters. In some systems, the shell is called a command interpreter.
-> Simply put, the shell is a program that takes your commands from the keyboard and gives them to the operating system to perform. In the old days, it was the only user interface available on a Unix computer. Nowadays, we have graphical user interfaces (GUIs) in addition to command line interfaces (CLIs) such as the shell.
On most Linux systems a program called bash (which stands for Bourne Again SHell, an enhanced version of the original Bourne shell program, sh, written by Steve Bourne) acts as the shell program. There are several additional shell programs available on a typical Linux system. These include: ksh, tcsh and zsh.
-> Another text window for a Unix shell is partially visible. In computing, a shell is a user interface for access to an operati