tak uz jsem to dokoncil do teto funkcni podoby
select nick,prihlasen,timediff(now(),prihlasen) as "rozdil" from user where timediff(now(),prihlasen) > "06:00:00"
uz se mi to nejakym zpusobem podarilo napsat, zjisti mi to rozdil ale nejde mi to proti zadnemu cislu porovnat, a rozdil mi vychazi v zapornych hodnotach
select nick,prihlasen,timediff(prihlasen, now()) from user where datediff(prihlasen, now()) < 6
Cau, chtel bych zacit programovat nejake aplikace pro mobilni zarizeni v jave. Ale na internetu nemuzu najit zadny vhodny tutorial a na youtube taky ne. Tak jestli mi muzete neco doporucit, treba i knizku. Programuji tri roky v c# a php tak bych to snad mohl pochopit.
Cau ucim se php, a ted sem narazil na problem ktery nevim jak vyresit protoze chybu nikde nevidim
server mi na prazdne strance vypise toto
Parse error: syntax error, unexpected $end in /home/studenti/petr.zdarsky/public_html/php/second.php on line 40
<?php
if(!isset($_GET['soucet']))
$_GET['soucet'] = 0;
if(!isset($_GET['pocet']))
$_GET['pocet'] = 0;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>second</title>
</head>
<body>
<form action="second.php" method="get">
<input type="text" name="vstup" />
<input type="submit" value="SEND!" />
<?php
if(is_numeric($_GET['vstup']))
{
$soucet += $_GET['vstup'];
$pocet++;
echo "pocet $pocet , soucet $soucet";
{
if($_GET['vstup'] == "end")
{
echo "Průměr vašich zadaných čísel je $soucet/$počet";
}
?>
<input type="hidden" name="soucet" value="<?php echo $soucet; ?>" />
<input type="hidden" name="pocet" value="<?php echo $pocet; ?>" />
</form>
</body>
</html>
Cau mam udelany prehravac za pomoci DirectX.VideoAudioPlayback, vse skvele funguje ale nevim jak je to mozny ale ty pisnicka je daleko dalsi nez co mi ukazuje system. Kdyz sleduju stav promennych tak pisnicka trva pres 300 sekund, ale winamp i system rika o stope ze ma jenom neco malo pres tri minuty. Nenapada nekoho cim to je?
tak ted uz taky nevim...todle jsem nevymejslel, to nam ucitel akorat ukazoval jak si pridat zvuk do nasich praci.....sam sem to nevymyslel, ale kazdopadne by to melo jit tim multithreadingem, vice jadrovy procesor na to nepotrebujes jak si se ptal
kdyz si pridas
using System.Threading;
using System.Runtime.InteropServices;
private byte[] sound = File.ReadAllBytes("tada.wav");
[DllImport("winmm.dll")]
private static extern bool PlaySound(byte[] memory, int module, int flags);
const int SND_SYNC = 0x0000;
const int SND_ASYNC = 0x0001;
const int SND_NODEFAULT = 0x0002;
const int SND_MEMORY = 0x0004;
const int SND_LOOP = 0x0000;
const int SND_NOSTOP = 0x0010;
const int SND_NOWAIT = 0x00002000;
const int SND_FILENAME = 0x00020000;
const int SND_RESOURCE = 0x00040004;
const int SND_PURGE = 0x0040;
const int SND_APPLICATION = 0x0080;
/// <summary>
/// asynchroni prehrani zvuku
/// </summary>
private void play()
{
PlaySound(sound, 0, SND_MEMORY | SND_ASYNC | SND_LOOP);
}