Skip to content

Instantly share code, notes, and snippets.

@vertrigo
vertrigo / reward.php
Created May 5, 2012 23:40
reward system
<?php
include config.php
function recent_players_count($accid, $user_ip)
{
mysql_connect($host, $user, $pass);
mysql_select_db('realmd');
$recent = 0;
$init = mysql_query("SELECT `invited_id`, `reg_ip` FROM `account_invited` WHERE `id`=$accid AND `rewarded`='0'");
while ($row = @mysql_fetch_array($init))
<?php
include config.php
include functions.php
echo "<table border = 1>
<tr><td>Аккаунт:</td><td>Количество активных подписчиков:</td>
</tr>";
mysql_connect($host, $user, $pass);
mysql_select_db($auth);
@vertrigo
vertrigo / step1.php
Created May 16, 2012 18:50
transfer
<meta http-equiv = "Content-Type" content = "charset=utf-8" />
<?php
include_once("t_dbfunctions.php");
include_once("t_functions.php");
include_once("t_config.php");
if (isset($_POST['Account']) && !empty($_POST['Account']) && isset($_POST['Password']) && !empty($_POST['Password'])
&& isset($_POST['ServerUrl']) && !empty($_POST['ServerUrl']) && isset($_POST['RealmlistList']) && !empty($_POST['RealmlistList'])) {
$o_Account = trim($_POST['Account']);
@vertrigo
vertrigo / gnome-control.sh
Created June 26, 2012 20:56
gnome-control-script
#!/bin/sh
CMD_W='gnome-shell --replace'
while test 1
do
OUTPUT=`ps -e|grep gnome-shell|grep -v grep`
if ! echo $OUTPUT | grep gnome-shell>/dev/null ; then
echo Restarting...
$CMD_W
else
@vertrigo
vertrigo / gnome-antifreeze.sh
Created June 28, 2012 13:03
gnome-antifreeze-control-script
#!/bin/sh
while test 1
do
LOAD=`ps axo pcpu,fname,stat | grep gnome-sh | grep Rl |awk '{s=s+$1} END {print (s)}'|awk '{ split($0, n, "."); print n[1] + (substr(n[2], 1, 1) >= 5 ? 1 : 0) }'`
OUTPUT=`ps -e|grep gnome-shell|grep -v grep`
if [ $LOAD -gt "90" ] ; then
echo Freeze...
killall --signal SIGKILL gnome-shell
else if echo $OUTPUT | grep gnome-shell>/dev/null ; then
echo All right.
diff --git a/src/game/Player.h b/src/game/Player.h
old mode 100644
new mode 100755
index e052f43..016f64a
--- a/src/game/Player.h
+++ b/src/game/Player.h
@@ -2597,9 +2597,9 @@ class MANGOS_DLL_SPEC Player : public Unit
Glyph m_glyphs[MAX_TALENT_SPEC_COUNT][MAX_GLYPH_SLOT_INDEX];
float m_auraBaseMod[BASEMOD_END][MOD_END];
diff --git a/src/game/Language.h b/src/game/Language.h
index 8e0cd9f..e857604 100755
--- a/src/game/Language.h
+++ b/src/game/Language.h
@@ -974,6 +974,9 @@ enum MangosStrings
// Broadcaster
LANG_AUTO_BROADCAST = 1300,
+ LANG_SERVER_INFO_CORE = 1301,
+ LANG_SERVER_INFO_OS = 1302,
Program ex1;
uses crt;
var x1, x2, y1, y2, d: integer;
begin
ClrScr;
WriteLn( 'Введите через пробел координаты x1, y1, x2, y2' );
ReadLn( x1, y1, x2, y2 );
d:= trunc( sqrt( sqr( x1 - x2 ) + sqr( y1 - y2 ) ) );
WriteLn( 'Целая часть расстояния между точками = ', d);
ReadKey;
Program lab2;
uses Crt; {подключаем библиотеку}
Const xn=0.2; xk=2.2; h=0.2; {объявляем и присваиваем значения константы согласно условию задачи}
Var x,y:real; {объявляем переменные x, y с типом real}
Begin
clrscr; {очищаем экран}
y:=0; x:=xn;
while x <= xk do {начинаем цикл, пока x не достигнет xk}
begin
Program lab2;
uses Crt;
Const xn=0.2; xk=2.2; h=0.2;
Var x,y:real;
Begin
clrscr;
y:=0; x:=xn;
while x <= xk do
begin