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
package main | |
import ( | |
"fmt" | |
"strconv" | |
) | |
type Elements map[string]float32 | |
type Node struct { |
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 function fight() { | |
$cmd = $this->getCommandHero(); | |
if ($cmd) { | |
// Da real deal | |
switch ($cmd) { | |
case 'hit' : $this->heroHit(); break; | |
case 'spell' : $this->heroSpell(); break; | |
case 'run' : if ($this->heroRun()) return $this->messages; break; | |
default: // Cheating hurts | |
} |
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 | |
$w1 = array( | |
'мистерията', | |
'тайната', | |
); | |
$where = array( | |
'от университета в Тянхъй', | |
'в малкото немско село', |
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
#top-bar, #gb{ | |
display: none; | |
} | |
#lhn-add-subscription-section, #viewer-header { | |
height: 40px; | |
} | |
a.entry-source-title { | |
color: #12C; |
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
-- | |
-- PostgreSQL database dump | |
-- | |
-- Dumped from database version 9.1.1 | |
-- Dumped by pg_dump version 9.1.1 | |
-- Started on 2011-11-02 16:53:36 EET | |
SET statement_timeout = 0; | |
SET client_encoding = 'UTF8'; |
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 | |
/** | |
* Creates static version of CodeIgniter site | |
* | |
* @author aquilax | |
*/ | |
class MY_Output extends CI_Output { | |
function __construct() { |
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 | |
/** | |
* Description of news | |
* | |
* @author aquilax | |
*/ | |
class Model_News extends Model{ | |
/* | |
* Load the news for the first page |
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 | |
$string = 'tabdaderdty'; | |
$counter = array_fill(0, 255, 0); | |
for ($i = 0; $i < strlen($string); $i++) { | |
$counter[ord($string[$i])]++; | |
} | |
arsort($counter); | |
echo $string.PHP_EOL; | |
foreach($counter as $k => $v){ | |
if ($v == 0) { |
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 | |
$K = 4; | |
function set($K){ | |
$prev = 0; | |
for ($i = 0; $i < $K; $i++){ | |
$prev = $prev * 2 + 1; | |
} | |
return $prev; | |
} |
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 | |
function edinici($n) { | |
switch($n) { | |
case 1: return 'едно'; | |
case 2: return 'две'; | |
case 3: return 'три'; | |
case 4: return 'четири'; | |
case 5: return 'пет'; | |
case 6: return 'шест'; |
OlderNewer