Skip to content

Instantly share code, notes, and snippets.

View arvindsvt's full-sized avatar

Arvind Shrivastwa arvindsvt

  • Ahmedabad
View GitHub Profile
@charset "UTF-8";
/* CSS Document */
/*66635D (gray) E54140 (red) F7EBD5 (cream) 6CC5C1 (aqua) 000000 (black) */
body
{
background-color: #F7EBD5;
font-family: sans-serif;
color: #66635D;
}
a
https://codewithmark.com/easily-edit-html-table-rows-or-cells-with-jquery
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function($)
{
<?php
function multidimensional_array_search($search_value,$array) {
$mached = array();
if(is_array($array) && count($array) > 0) {
foreach($array as $key => $value) {
if(is_array($value) && count($value) > 0) {
multidimensional_array_search($search_value,$value);
} else {
return array_search($search_value,$array); exit;
}
<html>
<head>
<title>Live Add Edit Delete Datatables Records using PHP Ajax</title>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<script src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.15/js/dataTables.bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/css/bootstrap-datepicker.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/js/bootstrap-datepicker.js"></script>
<style>
@arvindsvt
arvindsvt / recursion.php
Last active April 22, 2019 06:43 — forked from recck/recursion.php
Week 4 - Day 8 - Recursive Functions
https://www.geeksforgeeks.org/php-sum-digits-number/
Armstrong number in PHP
<?php
$num=407;
$total=0;
$x=$num;
while($x!=0)
{
$rem=$x%10;
$total=$total+$rem*$rem*$rem;
<?php
/**
* Recursive Functions
**/
/** Solving a Factorial **/
// Non Recursively
function factorial_NoRecursion($x){
$y = 1;
for($i = 1; $i <= $x; $i++){
<?php
$myArray = array(1, 19, 18, 12, 56);
function compare($a, $b) {
echo "Comparing $a to $b\n";
if ($a == $b) return 0;
return ($a < $b) ? -1 : 1;
}
<?php
function odd($var)
{
// returns whether the input integer is odd
return($var & 1);
}
function even($var)
{
// returns whether the input integer is even
<?php
function key_values_intersect($values,$keys) {
foreach($keys AS $key) {
$key_val_int[$key] = $values[$key];
}
return $key_val_int;
}
$big = array("first"=>2,"second"=>7,"third"=>3,"fourth"=>5);
class Fib{
//$memo and fibonacciMemo are static members
static $memo = array();
static function fibonacciMemo($n) {
if(array_key_exists($n, static::$memo)) {
return static::$memo[$n];
}
else {
if($n > 1) {
$result = static::fibonacciMemo($n-1) + static::fibonacciMemo($n-2);