$sql_count = 0;
function mysql_myquery( $sql = "" )
{
global $sql_count;
++$sql_count;
return mysql_query($sql);
}
DNS1=8.8.8.8
DNS2=4.4.4.4
cat /etc/resolv.conf
# Generated by NetworkManager
search 108.0.0.100
nameserver 8.8.8.8
nameserver 4.4.4.4
random.choice([1, 2, 3, 5, 9])
$input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
$rand_keys = array_rand($input, 1);
echo $input[$rand_keys[0]] . "\n";
// или
shuffle($input);
echo $input[0] . "\n";
$result = $mysqli->query("SELECT * FROM `entry` WHERE `descr` LIKE '%{$query}%' OR `content` LIKE '%{$query}%' OR `title` LIKE '%{$query}%'");
<?php
header( 'Content-Type: text/html; charset=utf-8' );
$xml = 'http://lenta.ru/rss/top7';
$rss = simplexml_load_file( $xml );
foreach( $rss->channel->item as $key => $item )
{
if( $key == 4 )
return;
$news_title = $item->title;
$news_link = $item->link;
echo $news_link;
echo $news_title;
}
?>
<script type="text/javascript" src="//api-maps.yandex.ru/2.0/?load=package.standard&lang=ru-RU" ></script>
<script type="text/javascript">
maps.ready(init);
var myMap;
function init()
{
myMap = new ymaps.Map("map",
{
center: [55.7491, 37.6162],
zoom: 12,
behaviors: ["default", "scrollZoom"]
},
{
balloonMaxWidth: 300
});
myMap.events.add("click", function(e)
{
var coords = e.get("coordPosition");
alert( "Координаты: " + [coords[0].toPrecision(10),coords[1].toPrecision(10)].join("; ") );
});
myMap.controls.add("searchControl");
myMap.controls.add("zoomControl");
myMap.controls.add("mapTools");
myMap.controls.add("typeSelector");
}
</script>
<div id="map" style="width:100%; height:500px"></div>
var tags = $('#tags')
tags.tagsinput();
tags.tagsinput('input').typeahead({
remote: "http://example.ru?query=%QUERY"
}).bind('typeahead:selected', $.proxy(function (obj, datum) {
tags.tagsinput('add', datum.value);
tags.tagsinput('input').typeahead('setQuery', '');
}, $('input')));