function syn ($in) { $symbols = \"!?.,\\"';:<>()[]*-= \"; for ($x = 0; $x< strlen ($symbols); $x ) { $in = str_replace ($symbols{$x}, ' '.$symbols{$x}, $in); } $words = fopen ('words.txt', 'r'); while (!feof ($words)) { $row = trim (fgets ($words)); list ($word, $syn) = explode (\"|\", $row); if ((strpos ($in, \" \".$word.\" \") === false) && (strpos (ucfirst ($in), \" \".ucfirst ($word).\" \") === false)) continue; $in = str_replace (\" \".$word.\" \", \"|\".$syn.\"|\", $in); $in = str_replace (\" \".ucfirst ($word).\" \", \"|\".ucfirst ($syn).\"|\", $in); } fclose ($words); $in = str_replace (\"|\", \" \", $in); for ($x = 0; $x< strlen ($symbols); $x ) { $in = str_replace (' '.$symbols{$x}, $symbols{$x}, $in); } return $in; } $d = opendir ('in'); while (($file = readdir ($d)) !== false) { if ($file {0} == '.') continue; file_put_contents ('out/'.$file, syn (file_get_contents ('in/'.$file))); echo $file.\"\r\n\"; } ?>
Camera camera; Grid grid; public Game1() { graphics = new GraphicsDeviceManager(this); content = new ContentManager(Services); camera = new Camera(this); this.Components.Add(camera); grid = new Grid(this); grid.Dimension = 256; grid.CellSize = 4; } protected override void LoadGraphicsContent(bool loadAllContent) { if (loadAllContent) { } grid.LoadGraphicsContent(); }
Чет многовато языков программирования
// *** Функция truncation - округление числа до сотых *** // ****************************************************** function truncation($number) { global $n; $n = strpos($number,'.'); if ($n > 0) {$n = substr($number,0,$n).substr($number,$n,3);} else {$n = $number;} return; }