This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> | |
<style> | |
.game {display:none;} | |
.active-g {display:block} | |
.checked {color:red;} | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_highlight($str) { | |
$colors = array('#ccddee', '#ffdddd', '#ddccee', | |
'#ddeecc', '#eeccdd', '#cceedd', | |
'#eeddcc', '#ddddff', '#ddffdd'); | |
shuffle($colors); | |
static $prev_color = ''; | |
static $arr = array(); | |
if (!in_array($str, $arr)) { | |
$arr[] = $str; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> | |
</head> | |
<body> | |
<!-- Popup --> | |
<div id="overlay" style="display:none; position: fixed; width: 100%; height: 100%; background-color: black; z-index:1101; opacity:0.7; filter: alpha(opacity=70); top:0; left:0;"></div> | |
<div id="popup" style="display:none; z-index:1101; position: fixed; width:100%; max-width:700px; height:100%; max-height:572px; top: 50%; left: 50%; margin-top: -286px; margin-left: -350px;"> | |
<a href="#" style="color:#fff; float:right; font-weight:bold;" onClick="setCookie()">Close <span class="glyphicon glyphicon-remove"></span></a> | |
<div style="width:700px; height:572px; background-color:#000;"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function rgb_gen($rgb, $percent) { | |
$cleaned_percent = preg_replace("/\..*|%/", "", $percent); | |
$rgb_increment = 100 - $cleaned_percent; | |
$rgb_arr = explode(',', $rgb); | |
$rgb_arr[0] + $rgb_increment <= 255 ? $rgb_arr[0]+=$rgb_increment : $rgb_arr[0] = 255; | |
$rgb_arr[1] + $rgb_increment <= 255 ? $rgb_arr[1]+=$rgb_increment : $rgb_arr[1] = 255; | |
$rgb_arr[2] + $rgb_increment <= 255 ? $rgb_arr[2]+=$rgb_increment : $rgb_arr[2] = 255; | |
$new_rgb = implode(',', $rgb_arr); | |
return $new_rgb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$servername = "localhost"; | |
$username = "root"; | |
$password = "toor"; | |
$dbname = "test"; | |
// Create connection | |
$conn = new mysqli($servername, $username, $password, $dbname); | |
// Check connection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
function pagination($url, $rowscount, $per_page) { | |
$ci = & get_instance(); | |
$ci->load->library('pagination'); | |
$config = array(); | |
$config["base_url"] = base_url($url); | |
$config["total_rows"] = $rowscount; | |
$config["per_page"] = $per_page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Bootstrap 101 Template</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT SUM(IF(category_id=1,1,0)) as category_one, SUM(IF(category_id=2,1,0)) as category_two, SUM(IF(category_id=3,1,0)) as category_three, SUM(IF(category_id=4,1,0)) as category_four, SUM(IF(category_id=5,1,0)) as category_five, SUM(IF(category_id=6,1,0)) as category_six, SUM(IF(category_id=7,1,0)) as category_seven, SUM(IF(category_id=8,1,0)) as category_eight, SUM(IF(category_id=9,1,0)) as category_nine, SUM(IF(category_id=10,1,0)) as category_ten, SUM(IF(category_id=11,1,0)) as category_eleven, SUM(IF(category_id=12,1,0)) as category_twelve FROM my_table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You probably have a permission issue. Add your user ID to group vboxusers with this command: sudo usermod -a -G vboxusers $USER, log off, log on and try again. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Какво е WGet ? | |
wget е съкращение от "web get". Това е command-line програма която се използва за сваляне на файлове от интернет. | |
Синтакс | |
wget [option]... [URL]... | |
Подробно описание |
OlderNewer