A hand crafted markdown document contains all major Javascript topics covered, taken from different sources. Brush Up your JS memory.
Single line comments start with //
. For multi-line commands, you use /* ... */
// This is a single line comment
<?php | |
if(isset($_GET['submit_value']) && !empty($_GET['search_input'])) | |
{ | |
include("db_config.php"); | |
$db = database::getInstance(); | |
$searchValue = $_GET['search_input']; | |
$sql = "SELECT * FROM `sitedata` WHERE c_main_title LIKE '%$searchValue%' OR c_main_body LIKE '%$searchValue%' OR cmt_dept_title LIKE '%$searchValue%' OR cmt_dept_body LIKE '%$searchValue%' | |
OR aidt_dept_title LIKE '%$searchValue%' OR aidt_dept_body LIKE '%$searchValue%' OR food_dept_title LIKE '%$searchValue%' OR food_dept_body LIKE '%$searchValue%' OR rac_dept_title LIKE '%$searchValue%' |
<?php foreach ($result as $row) { | |
$value1 = strpos($row['c_main_title'], $searchValue) !== FALSE; | |
$value2 = strpos($row['c_main_body'], $searchValue) !== FALSE; | |
$value3 = strpos($row['cmt_dept_title'], $searchValue) !== FALSE; | |
$value4 = strpos($row['cmt_dept_body'], $searchValue) !== FALSE; | |
$value5 = strpos($row['aidt_dept_title'], $searchValue) !== FALSE; | |
$value6 = strpos($row['aidt_dept_body'], $searchValue) !== FALSE; | |
$value7 = strpos($row['food_dept_title'], $searchValue) !== FALSE; | |
$value8 = strpos($row['food_dept_body'], $searchValue) !== FALSE; | |
$value9 = strpos($row['rac_dept_title'], $searchValue) !== FALSE; |
<?php | |
SET @sql = NULL; | |
SELECT | |
GROUP_CONCAT(DISTINCT | |
CONCAT( | |
'max(CASE WHEN ca.date = ''', | |
date_format(date, '%Y-%m-%d'), | |
''' THEN coalesce(p.status, ''P'') END) AS `', | |
date_format(date, '%Y-%m-%d'), '`' | |
) |
<?php | |
if(isset($_POST['Submit'])){ | |
for($i=0;$i<$count;$i++){ | |
$name = $_POST['name']; | |
$f_name = $_POST['lastname']; | |
$m_name = $_POST['email']; | |
// This is a query for uploading multiple values in single query. | |
$sql1="UPDATE computer SET s_name='$name[$i]', f_name='$f_name[$i]', m_name='$m_name[$i]' WHERE roll='$id[$i]'"; |
<?php | |
ob_start(); | |
include('../db_config.php'); | |
$db = database::getInstance(); | |
$sql = "SELECT * FROM computer"; | |
$result = $db->dbc->query($sql); | |
$count = $result->rowCount(); | |
?> |
<?php | |
ob_start(); | |
include('../db_config.php'); | |
$db = database::getInstance(); | |
$sql = "SELECT * FROM computer"; | |
$result = $db->dbc->query($sql); | |
$count = $result->rowCount(); | |
?> |
# install babel with npm or yarn | |
`npm install --save-dev babel-cli` | |
=> add a script on `package.json` for babel with this line: `babel-node FILENAME_TO_SERVE` | |
=> install babel ES6 presets `npm install --save-dev babel-preset-es2015` | |
=> add es6 presets to `.babelrc` file `{ "presets": ["es2015"] }` | |
#And there we go! |
#Docker Installation: | |
First, add the GPG key for the official Docker repository to the system: | |
`curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -` | |
`sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"` | |
`sudo apt-get update` | |
Make sure you are about to install from the Docker repo instead of the default Ubuntu 16.04 repo: | |
`apt-cache policy docker-ce` |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, minimum-scale=1"> | |
<title>Accountkit</title> | |
</head> | |
<body> |