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
protected void Application_Start() | |
{ | |
Registry registry = new Registry(); | |
registry.Schedule<SampleJob1>().ToRunEvery(3).Seconds(); | |
registry.Schedule<SampleJob2>().ToRunEvery(1).Days().At(21, 15); | |
TaskManager.Initialize(registry); | |
TaskManager.Start(); | |
} |
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
using System; | |
using System.Reactive.Linq; | |
using System.Windows.Forms; | |
namespace WindowsFormsApplication1 | |
{ | |
static class Program | |
{ | |
/// <summary> | |
/// The main entry point for the application. |
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
void Form1_Load(object sender, EventArgs e) | |
{ | |
IObservable<Point> points = from mme in Observable.FromEventPattern<MouseEventArgs>(target: this, eventName: "MouseMove") | |
where mme.EventArgs.X == mme.EventArgs.Y | |
select mme.EventArgs.Location; | |
DisplayData(points); | |
} | |
private void DisplayData(IObservable<Point> points) |
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
class UseSubject | |
{ | |
public class Order | |
{ | |
private DateTime? _paidDate; | |
private readonly Subject<Order> _paidSubj = new Subject<Order>(); | |
public IObservable<Order> Paid { get { return _paidSubj.AsObservable(); } } | |
public void MarkPaid(DateTime paidDate) |
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
public class Hrac | |
{ | |
public Hrac(string meno) | |
{ | |
this.MenoHraca = meno; | |
} | |
// Vlastnost MenoHraca umoznuje ziskat alebo nastavit meno hraca. | |
public string MenoHraca | |
{ |
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
// http://pla.nette.org/cs/vicenasobne-pouziti-samostatneho-formulare | |
class LoginPresenter extends \Nette\Application\UI\Presenter | |
{ | |
/** | |
* @return LoginForm | |
*/ | |
protected function createComponentLoginForm() | |
{ | |
$form = new LoginForm($this->getUser()); |
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
// unserialize(): Error at offset 68 of 845 bytes | |
Visitor: | |
O:39:"UnitedPrototype\GoogleAnalytics\Visitor":12:{s:11:"*uniqueId";N;s:17:"*firstVisitTime";O:8:"DateTime":3:{s:4:"date";s:19:"2013-03-18 22:33:38";s:13:"timezone_type";i:3;s:8:"timezone";s:17:"Europe/Bratislava";}s:20:"*previousVisitTime";r:3;s:19:"*currentVisitTime";O:14:"Nette\DateTime":3:{s:4:"date";s:19:"2013-03-18 22:33:38";s:13:"timezone_type";i:3;s:8:"timezone";s:17:"Europe/Bratislava";}s:13:"*visitCount";i:1;s:12:"*ipAddress";s:9:"127.0.0.1";s:12:"*userAgent";s:120:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22";s:9:"*locale";N;s:15:"*flashVersion";N;s:14:"*javaEnabled";N;s:19:"*screenColorDepth";N;s:19:"*screenResolution";N;} | |
SHA1: | |
4554e7f7b9c9ae5ad60569c81bee5e5d569d9264 | |
base64: | |
TzozOToiVW5pdGVkUHJvdG90eXBlXEdvb2dsZUFuYWx5dGljc1xWaXNpdG9yIjoxMjp7czoxMToiKnVuaXF1ZUlkIjtOO3M6MTc6IipmaXJzdFZpc2l0VGltZSI7Tzo4OiJEYXRlVGltZSI6Mzp7czo0OiJkYXRlIjtzOjE5OiIyMDEzLTAzLTE4IDI |
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 | |
//----------------------------------------------------------------------------- | |
//documentation on the spreadsheet package is at: | |
//http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.php | |
//----------------------------------------------------------------------------- | |
require_once 'Writer.php'; | |
$workbook = new Spreadsheet_Excel_Writer(); | |
$format =& $workbook->addFormat(); |
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 | |
// Build this query using Zend_Db_Expr explicitly: | |
// SELECT p."product_id", p.cost * 1.08 AS cost_plus_tax | |
// FROM "products" AS p | |
$select = $db->select() | |
->from(array('p' => 'products'), | |
array('product_id', | |
'cost_plus_tax' => |
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 | |
// http://localhost:8080/local-json.php | |
header('Content-Type: application/json'); | |
header('Access-Control-Allow-Origin: *'); | |
$data = array('response' => TRUE, 'time' => time() ); | |
echo json_encode($data); |
OlderNewer