1
0

Added new programs - fixed a few things ....

This commit is contained in:
Mike Schwörer 2014-08-04 20:10:58 +02:00
parent f8df6da103
commit 59d911e682
16 changed files with 54 additions and 26 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,3 @@
A little PHP library to display and update an commit Overview from [Github](https://github.com/).
Design-wise its similiar to the official Commit Graph from github - but you can see your commits over a bigger timeframe.

View File

@ -0,0 +1,14 @@
SharkSim is my take on a Wa-Tor simulation ([wikipedia.org/wiki/Wator](wikipedia.org/wiki/Wator))
The rules of this [cellular automaton](http://en.wikipedia.org/wiki/Cellular_automaton) are:
> Time passes in discrete jumps, which I shall call chronons.
> During each chronon a fish or shark may move north, east, south or west to an adjacent point, provided the point is not already occupied by a member of its own species.
> A random-number generator makes the actual choice.
> For a fish the choice is simple: select one unoccupied adjacent point at random and move there.
> If all four adjacent points are occupied, the fish does not move.
> Since hunting for fish takes priority over mere movement, the rules for a shark are more complicated:
> from the adjacent points occupied by fish, select one at random, move there and devour the fish.
> If no fish are in the neighborhood, the shark moves just as a fish does, avoiding its fellow sharks.
My implementation is not that fancy - but it gets to a stable FPS rate of 45 with a map of the size 600x600.

View File

@ -0,0 +1,4 @@
This is a little handy tool - mainly for my own personal use.
It scans a folder for (programming) projects and counts the total amount of sourcecode lines.
It also scans for todo-comments (or every other thing you can express with regex)

View File

@ -14,13 +14,7 @@
<div <?php echo $this->getContentTagDefinition(); ?>> <div <?php echo $this->getContentTagDefinition(); ?>>
<div> <div>
<p> <?php echo ParsedownHelper::parse($this->content); ?>
<?php
echo ParsedownHelper::parse($this->content);
?>
</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -117,7 +117,7 @@ class BlogPost extends CActiveRecord
$name = str_replace(' ', '_', $name); $name = str_replace(' ', '_', $name);
$name = preg_replace("/[^A-Za-z0-9_]/", '', $name); $name = preg_replace("/[^A-Za-z0-9_]/", '', $name);
return '/blog/' . $this->ID . '/' . $name; return '/blog/' . $this->ID . '/' . rawurlencode($name);
} }
/** /**

View File

@ -163,7 +163,7 @@ class Program extends CActiveRecord
*/ */
public function getImagePath() { public function getImagePath() {
if (file_exists('images/programs/thumbnails/' . $this->Name . '.png')) if (file_exists('images/programs/thumbnails/' . $this->Name . '.png'))
return '/images/programs/thumbnails/' . $this->Name . '.png'; return '/images/programs/thumbnails/' . rawurlencode($this->Name) . '.png';
// else if (file_exists('images/programs/thumbnails/' . $this->Name . '.jpg')) // else if (file_exists('images/programs/thumbnails/' . $this->Name . '.jpg'))
// return '/images/programs/thumbnails/' . $this->Name . '.jpg'; // return '/images/programs/thumbnails/' . $this->Name . '.jpg';
else throw new CHttpException(500, "Could not find Program Thumbnail '" . $this->Name . "'"); else throw new CHttpException(500, "Could not find Program Thumbnail '" . $this->Name . "'");
@ -173,14 +173,14 @@ class Program extends CActiveRecord
* @return string * @return string
*/ */
public function getLink() { public function getLink() {
return '/programs/view/' . $this->Name; return '/programs/view/' . rawurlencode($this->Name);
} }
/** /**
* @return string * @return string
*/ */
public function getDownloadLink() { public function getDownloadLink() {
return '/programs/download/' . $this->Name; return '/programs/download/' . rawurlencode($this->Name);
} }
/** /**
@ -188,7 +188,7 @@ class Program extends CActiveRecord
*/ */
public function getDirectDownloadLink() { public function getDirectDownloadLink() {
if ($this->download_url == 'direkt' || is_null($this->download_url) || empty($this->download_url)) if ($this->download_url == 'direkt' || is_null($this->download_url) || empty($this->download_url))
return '/data/programs/' . $this->Name . '.zip'; return '/data/programs/' . rawurlencode($this->Name) . '.zip';
else else
return $this->download_url; return $this->download_url;
} }

View File

@ -12,18 +12,15 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title><?php <title><?php echo CHtml::encode($this->pageTitle) ?></title>
echo $this->pageTitle; ?></title>
<meta name="description" content=""> <meta name="description" content="">
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<link rel="icon" type="image/png" href="/images/favicon.png"/> <?php //TODO-MS Add nice favicon ?> <link rel="icon" type="image/png" href="/images/favicon.png"/>
<?php Yii::app()->bootstrap->register(); ?> <?php Yii::app()->bootstrap->register(); ?>
<link rel="stylesheet" type="text/css" href="/css/styles.css"/> <link rel="stylesheet" type="text/css" href="/css/styles.css"/>
<link rel="stylesheet" type="text/css" href="/css/prism.css"/> <link rel="stylesheet" type="text/css" href="/css/prism.css"/>
<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head> </head>
<body> <body>
<!--if lt IE 7]> <!--if lt IE 7]>

View File

@ -32,7 +32,12 @@
<?php echo $form->textFieldControlGroup($model,'Kategorie',array('rows'=>6,'span'=>8)); ?> <?php echo $form->textFieldControlGroup($model,'Kategorie',array('rows'=>6,'span'=>8)); ?>
<?php echo $form->textFieldControlGroup($model,'Sterne',array('span'=>5)); ?> <?php
if ($model->isNewRecord)
echo $form->textFieldControlGroup($model,'Sterne',array('span'=>5, 'value' => '0'));
else
echo $form->textFieldControlGroup($model,'Sterne',array('span'=>5));
?>
<?php <?php
if ($model->isNewRecord) if ($model->isNewRecord)
@ -61,7 +66,12 @@
echo $form->textFieldControlGroup($model,'add_date',array('span'=>5, )); echo $form->textFieldControlGroup($model,'add_date',array('span'=>5, ));
?> ?>
<?php echo $form->textFieldControlGroup($model,'download_url',array('rows'=>6,'span'=>8)); ?> <?php
if ($model->isNewRecord)
echo $form->textFieldControlGroup($model,'download_url',array('rows'=>6,'span'=>8, 'value' => 'direkt'));
else
echo $form->textFieldControlGroup($model,'download_url',array('rows'=>6,'span'=>8, ));
?>
<?php echo $form->textFieldControlGroup($model,'sourceforge_url',array('rows'=>6,'span'=>8)); ?> <?php echo $form->textFieldControlGroup($model,'sourceforge_url',array('rows'=>6,'span'=>8)); ?>
@ -69,16 +79,22 @@
<?php echo $form->textFieldControlGroup($model,'github_url',array('rows'=>6,'span'=>8)); ?> <?php echo $form->textFieldControlGroup($model,'github_url',array('rows'=>6,'span'=>8)); ?>
<?php <?php
if ($model->isNewRecord) if ($model->isNewRecord)
echo $form->textFieldControlGroup($model,'uses_absCanv',array('span'=>5, 'value' => date('Y-m-d'))); echo $form->textFieldControlGroup($model,'uses_absCanv',array('span'=>5, 'value' => '0'));
else else
echo $form->textFieldControlGroup($model,'uses_absCanv',array('span'=>5, )); echo $form->textFieldControlGroup($model,'uses_absCanv',array('span'=>5, ));
?> ?>
<?php echo $form->textFieldControlGroup($model,'update_identifier',array('span'=>5,'maxlength'=>28)); ?> <?php echo $form->textFieldControlGroup($model,'update_identifier',array('span'=>5,'maxlength'=>28)); ?>
<?php echo $form->textFieldControlGroup($model,'highscore_gid',array('span'=>5)); ?> <?php
if ($model->isNewRecord)
echo $form->textFieldControlGroup($model,'highscore_gid',array('span'=>5, 'value' => '-1'));
else
echo $form->textFieldControlGroup($model,'highscore_gid',array('span'=>5));
?>
<div class="form-actions"> <div class="form-actions">
<?php echo MsHtml::submitButton($model->isNewRecord ? 'Create' : 'Save',array( <?php echo MsHtml::submitButton($model->isNewRecord ? 'Create' : 'Save',array(

View File

@ -6,8 +6,8 @@ $config=dirname(__FILE__).'/config/console.php';
require_once($yiic); require_once($yiic);
// TODO-MS SharkSim (OLD DATE !) -> MS.de // TODO-MS SharkSim (OLD DATE !) -> MS.de [X]
// TODO-MS BefunGen -> MS.de // TODO-MS BefunGen -> MS.de [X]
// TODO-MS jClipCorn -> MS.de // TODO-MS jClipCorn -> MS.de [O]
// TODO-MS jQCCounter (OLD DATE !) -> MS.de // TODO-MS jQCCounter (OLD DATE !) -> MS.de [X]
// TODO-MS ExtendedGitGraph -> MS.de // TODO-MS ExtendedGitGraph -> MS.de [X]