Премини към съдържанието
Форумът в приложение

По-лесно сърфиране. Научи повече.

Kaldata.com - Форуми

Приложение на форума на цял екран с push известия, значки и други.

За да инсталирате това приложение на iOS и iPadOS
  1. Докоснете Иконата за споделяне в Safari
  2. Превъртете менюто и докоснете Добавяне към началния екран.
  3. Докоснете Добавяне в горния десен ъгъл.
За да инсталирате това приложение на Android
  1. Докоснете менюто с 3 точки (⋮) в горния десен ъгъл на браузъра.
  2. Докоснете Добавяне към началния екран или Инсталиране на приложение.
  3. Потвърдете, като докоснете Инсталиране.

Добре дошли!

Добре дошли в нашите форуми, пълни с полезна информация. Имате проблем с компютъра или телефона си? Публикувайте нова тема и ще намерите решение на всичките си проблеми. Общувайте свободно и открийте безброй нови приятели.

Моля, регистрирайте се за да публикувате тема и да получите пълен достъп до всички функции.

 

RQ:Модове за тракер

Featured Replies

Може ли да ми дадете някакви модове за тракер?

Ето ти един хубав мод показващ последните 5 торента на индекса

Отвори index.php и постави където искаш да се показват новите торенти.Постави това

<h2>Последно качени</h2>

<?

$sql = "SELECT * FROM torrents where visible='yes' ORDER BY added DESC LIMIT 5";

$result = mysql_query($sql) or die('No torrents found');

if( mysql_num_rows($result) != 0 )

{


print'<table width=98% border=1 cellspacing=0 cellpadding=5>';

print'<tr>';

print'<td  width=100 >Постер</td>';

print'<td class=rowhead>Име</td>';

print'<td class=rowhead>Лийчъри</td>';

print'<td class=rowhead>Сийдъри</td>';

print'</tr>';


while( $row = mysql_fetch_assoc($result) )

{

print'<tr>';

print'<a href="details.php?id=' . $row['id'] . '&hit=1"><td><img src=' . $row['IMG'] . '  width=100  height=100 border=0></td><td><br>' . $row['name'] . ' <br>' . substr(format_comment($row[descr]),0,100) . '</a>';

print'<td align=left>    ' . $row['leechers'] . '</td>';

print'<td align=left>    ' . $row['seeders'] . '</td>';

print'</tr>';

}

print '</table>';

}

else

{

print 'No torrents found';

}

?>

ето ти и скрийншот да видиш какво представлява цък

Редактирано от Foka (преглед на промените)

Не разбирам нищо от това,ама нищо,но като искам много да помогна-незнам какво давам!Виж

Код:

/* Dev-C++ 4.9.9.2

* ANSI C version

* Some trigonometric equations:

* x / 180.0 = y / PI -> y = x * (PI / 180.0)

* x in degrees, y in radians

* sin(180 - phi) = sin(phi)

* b = a * sin(betha) and c = a * sin(gamma)

* Sabc = 0.5 * a * b * sin(gamma)

* = 0.5 * a * a * sin(betha) * sin(gamma)

* Sabc = 0.5 * (a + b + c) * r

* = 0.5 * (a + a * sin(betha) + a * sin(gamma)) * r

* = 0.5 * a * (1.0 + sin(betha) + sin(gamma)) * r

*/

#include <stdio.h>

#include <stdlib.h>

#include <math.h>

#include <conio.h>

/* We're not sure about type of elements for each array

* but double seems resonably

*/

#define SD sizeof(double)

#define DEGTORAD (M_PI / 180.0)

#define MIN_CNT 1

#define MAX_CNT 15

double deg2rad(double angle)

{

double r, temp;

unsigned c;

/* Fools are fools, but angle must have value in (0..180) for proper result

* Sorry for my bad english!

*/

temp = fabs(angle);

c = (unsigned) floor(temp);

r = temp - c;

c %= 180;

r += c;

return r;

}

unsigned array_count(char *name)

{

unsigned n;

do

{

printf("Enter count of triangles %s[%u..%u]= ", name, MIN_CNT, MAX_CNT);

scanf("%u", &n);

}

while ((n < MIN_CNT) || (n > MAX_CNT));

return n;

}

double *array_alloc(unsigned count)

{

return (double *) malloc((count * SD));

}

void array_free(void *ptr)

{

free(ptr);

}

void array_show(char *name, double array[], unsigned count)

{

unsigned n;

for (n = 0; n < count; printf("%s[%u] = %lf\n", name, (n + 1), array[n]), n++)

;

}

unsigned imin(double array[], unsigned nelem)

{

unsigned ret = 0, n;

double value, vmin;

for (n = 0; n < nelem; n++)

{

if (nelem)

{

if (n)

{

value = array[n];

if (vmin > value)

{

vmin = value;

ret = (n + 1);

}

}

else

{

vmin = array[0];

ret = 1;

}

}

}

return ret; /* If ret == 0 -> There's no entries */

}

unsigned imax(double array[], unsigned nelem)

{

unsigned ret = 0, n;

double value, vmax;

for (n = 0; n < nelem; n++)

{

if (nelem)

{

if (n)

{

value = array[n];

if (vmax < value)

{

vmax = value;

ret = (n + 1);

}

}

else

{

vmax = array[0];

ret = 1;

}

}

}

return ret; /* If ret == 0 -> There's no entries */

}

int main()

{

unsigned nm = array_count("M"), n, smax, rmin;

double *pa = array_alloc(nm),

*pbetha = array_alloc(nm),

*pgamma = array_alloc(nm),

*parea = array_alloc(nm),

*pr = array_alloc(nm),

temp, tarea, betha, gamma;

/* Here we fill arrays, on the fly calculating areas, and radiuses

*/

for (n = 0; n < nm; n++)

{

tarea = 0.5;

/* !!! we always have division by 2.0 */

printf("a[%u] = ", (n + 1));

scanf("%lf", &temp);

temp = fabs(temp);

pa[n] = temp;

tarea *= temp;

tarea *= temp;

printf("betha[%u] = ", (n + 1));

scanf("%lf", &temp);

betha = deg2rad(temp);

pbetha[n] = betha;

do

{

printf("gamma[%u] = ", (n + 1));

scanf("%lf", &temp);

gamma = deg2rad(temp);

}

while ((180.0 - gamma) < 0.0);

/* What for triangle is else of course? */

pgamma[n] = gamma;

tarea *= sin(betha * DEGTORAD);

tarea *= sin(gamma * DEGTORAD);

parea[n] = tarea;

pr[n] = ((2.0 * tarea) / (1.0 + sin(betha) + sin(gamma)));

}

/* End of little for loop

*/

array_show("a", pa, nm);

array_show("betha", pbetha, nm);

array_show("gamma", pgamma, nm);

array_show("area", parea, nm);

array_show("radius", pr, nm);

smax = imax(parea, nm) - 1;

rmin = imin(pr, nm) - 1;

/*

printf("Triangle #%u has maximal area = %lf\n", smax + 1, parea[smax]);

printf("Triangle #%u has minimal radius for enrolled circle = %lf\n", rmin + 1, pr[rmin]);

*/

printf("Triangle #%u with a = %lf, and betha = %lf, gamma = %lf\nhas maximal area = %lf\n",

smax + 1, pa[smax], pbetha[smax], pgamma[smax], parea[smax]);

printf("Triangle #%u with a = %lf, and betha = %lf, gamma = %lf\nhas minimal radius for enrolled circle = %lf\n",

rmin + 1, pa[rmin], pbetha[rmin], pgamma[rmin], pr[rmin]);

/* Repeat is the mother of knowledge ... */

array_show("a", pa, nm);

array_show("betha", pbetha, nm);

array_show("gamma", pgamma, nm);

array_show("area", parea, nm);

array_show("radius", pr, nm);

/* Repeat is the mother of knowledge ... */

array_free(pa);

array_free(pbetha);

array_free(pgamma);

array_free(parea);

array_free(pr);

getch();

return 0;

}

Код:

#include <cmath> // sin(), fabs(), cos()

#include <iostream> // cout, endl, ...

#include <algorithm> // max_element(), min_element()

using namespace std;

typedef unsigned int uint;

struct TR // Triangle

{

double AB;

double ALFA;

double BETA;

};

int main()

{

uint M=0;

do{

cin >> M; //get M

}

while(!(M<15));

TR *trArr = new TR [M]; // ALLOCATES TRIANGLE ARRAY

double *Radius = new double [M]; // ALLOCATES RADIUS ARRAY

double *Surface = new double [M]; // ALLOCATES SURFACE ARRAY

for(uint i=0; i<M; ++i){

cin >> trArr.AB; // get AB

cin >> trArr.ALFA; // get angle ALFA

cin >> trArr.BETA; // get angle BETA

}

for(uint i=0; i<M; ++i){

Radius= (trArr.AB) //r=AB*sin(ALFA/2)*sin(BETA/2)/cos((180-ALFA-BETA)/2)

*

sin(trArr.ALFA/2.0)

*

sin(trArr.BETA/2.0)

/

sin((trArr.ALFA+trArr.BETA)/2.0)

;//cos(90-X)=sin(X)

Surface=Radius*2.0*3.1415927; // S=2*Pi*r (hope so :P)

}

//some STL goings on

//std::max_element retrurns pointer to the biggest element in the array/container

cout << "Biggest surface: " << *(std::max_element(Surface, Surface+M)) << endl;

cout << "Smallest radius: " << *(std::min_element(Radius, Radius+M)) << endl;

cout << endl;

//Print the whole damn thing

for(uint i=0; i<M; ++i){

cout << "Triangle: " << (i+1) << endl;

cout << "Angle Alfa: " << trArr.ALFA << endl;

cout << "Angle Beta: " << trArr.BETA << endl;

cout << "AB: " << trArr.AB << endl;

cout << "Inscribed circle's radius: " << Radius << endl;

cout << "Inscribed circle's surface: " << Surface << endl;

cout << endl;

}

return 0;

}

//HOPE THIS HELPS

Хммм за какво е този код нещо не го разбирам.

Ето ти друг код за статус бар

Отвори bittorrent.php и търси

</td>


<td class=clear>


<div align=center>


<img src=/pic/logo.gif align=center>


</div>


</td>


<td class=clear width=49% align=right>


<a href=donate.php><img src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" alt="Make a donation" style='margin-top: 5px'></a>


</td>


</tr></table>
След като го намериш след тези редове постави този код
<!-- /////// some vars for the statusbar;o) //////// -->


<? if ($CURUSER) { ?>


<?


$datum = getdate();


$datum[hours] = sprintf("%02.0f", $datum[hours]);


$datum[minutes] = sprintf("%02.0f", $datum[minutes]);


$uped = mksize($CURUSER['uploaded']);


$downed = mksize($CURUSER['downloaded']);


if ($CURUSER["downloaded"] > 0)


{


$ratio = $CURUSER['uploaded'] / $CURUSER['downloaded'];


$ratio = number_format($ratio, 3);


$color = get_ratio_color($ratio);


if ($color)


$ratio = "<font color=$color>$ratio</font>";


}


else


if ($CURUSER["uploaded"] > 0)


$ratio = "Inf.";


else


$ratio = "---";




if ($CURUSER['donor'] == "yes")


$medaldon = "<img src=pic/star.gif alt=donor title=donor>";




if ($CURUSER['warned'] == "yes")


$warn = "<img src=pic/warned.gif alt=warned title=warned>";




//// check for messages //////////////////


$res1 = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND location IN ('in', 'both')") or print(mysql_error());


$arr1 = mysql_fetch_row($res1);


$messages = $arr1[0];


$res1 = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND location IN ('in', 'both') AND unread='yes'") or print(mysql_error());


$arr1 = mysql_fetch_row($res1);


$unread = $arr1[0];


$res1 = mysql_query("SELECT COUNT(*) FROM messages WHERE sender=" . $CURUSER["id"] . " AND location IN ('out', 'both')") or print(mysql_error());


$arr1 = mysql_fetch_row($res1);


$outmessages = $arr1[0];


$res1 = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " && unread='yes'") or die("OopppsY!");


$arr1 = mysql_fetch_row($res1);


$unread = $arr1[0];


if ($unread)


$inboxpic = "<img height=14px style=border:none alt=inbox title='inbox (new messages)' src=pic/pn_inboxnew.gif>";


else


$inboxpic = "<img height=14px style=border:none alt=inbox title='inbox (no new messages)' src=pic/pn_inbox.gif>";




//// check active torrents ///////////////////////


$res2 = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" . $CURUSER["id"] . " AND seeder='yes'") or print(mysql_error());


$row = mysql_fetch_row($res2);


$activeseed = $row[0];


$res2 = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" . $CURUSER["id"] . " AND seeder='no'") or print(mysql_error());


$row = mysql_fetch_row($res2);


$activeleech = $row[0];


//// end


?>




<!-- //////// start the statusbar ///////////// -->


<table cellpadding="4" cellspacing="1" border="0" style="width:100%">


<tr>


<td ><table style="width:100%" cellspacing="0" cellpadding="0" border="0">


<tr>


<td class="bottom" align="left"><span class="smallfont">Welcome back, <b><a href="userdetails.php?id=<?=$CURUSER['id']?>"><?=$CURUSER['username']?></a></b><?=$medaldon?><?=$warn?>&nbsp; [<a href="logout.php">logout</a>]<br/>


<font color=1900D1>Ratio:</font> <?=$ratio?>&nbsp;&nbsp;<font color=green>Uploaded:</font> <font color=black><?=$uped?></font>&nbsp;&nbsp;<font color=darkred>Downloaded:</font> <font color=black><?=$downed?></font>&nbsp;&nbsp;<font color=1900D1>Active Torrents:&nbsp;</font></span> <img alt="Torrents seeding" title="Torrents seeding" src="pic/arrowup.gif">&nbsp;<font color=black><span class="smallfont"><?=$activeseed?></span></font>&nbsp;&nbsp;<img alt="Torrents leeching" title="Torrents leeching" src="pic/arrowdown.gif">&nbsp;<font color=black><span class="smallfont"><?=$activeleech?></span></font></td>


<td class="bottom" align="right"><span class="smallfont">The time is now: <?echo "$datum[hours]:$datum[minutes]";?><br/>


<?


if ($messages){


print("<span class=smallfont><a href=inbox.php>$inboxpic</a> $messages ($unread New)</span>");


if ($outmessages)


print("<span class=smallfont>&nbsp;&nbsp;<a href=inbox.php?out=1><img height=14px style=border:none alt=sentbox title=sentbox src=pic/pn_sentbox.gif></a> $outmessages</span>");


else


print("<span class=smallfont>&nbsp;&nbsp;<a href=inbox.php?out=1><img height=14px style=border:none alt=sentbox title=sentbox src=pic/pn_sentbox.gif></a> 0</span>");


}


else


{


print("<span class=smallfont><a href=inbox.php><img height=14px style=border:none alt=inbox title=inbox src=pic/pn_inbox.gif></a> 0</span>");


if ($outmessages)


print("<span class=smallfont>&nbsp;&nbsp;<a href=inbox.php?out=1><img height=14px style=border:none alt=sentbox title=sentbox src=pic/pn_sentbox.gif></a> $outmessages</span>");


else


print("<span class=smallfont>&nbsp;&nbsp;<a href=inbox.php?out=1><img height=14px style=border:none alt=sentbox title=sentbox src=pic/pn_sentbox.gif></a> 0</span>");


}


print("&nbsp;<a href=friends.php><img style=border:none alt=Buddylist title=Buddylist src=pic/buddylist.gif></a>");


?>


</span></td>




</tr>


</table></table>


<p>


<? }?>


<!-- /////////// here we go, with the menu //////////// -->

Хммм за какво е този код нещо не го разбирам.

Ами и аз ти казвам,че не разбирам,за некво Dev C++ biggrin.gif

Регистрирайте се или влезете в профила си за да коментирате

Разглеждащи това в момента 0

  • Няма регистрирани потребители разглеждащи тази страница.

Дарение

  • Подкрепи съществуването на форума - направи дарение
    32%
    Дарени 315 € от нужните 1 000 €

Бюлетин

Получавайте известие, когато има важна промяна или новина свързана с форума.

Профил

Навигация

Търсене

Търсене

Конфигуриране на push известия в браузъра

Chrome (Android)
  1. Докоснете иконата на катинар до адресната лента.
  2. Докоснете Разрешения → Известия.
  3. Променете предпочитанията си.
Chrome (Desktop)
  1. Кликнете върху иконата на катинар в адресната лента.
  2. Изберете Настройки на сайта.
  3. Намерете Известия и коригирайте предпочитанията си.