This file contains hidden or 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
var n, h: Integer; | |
function isPrime(n: INteger): Boolean; | |
var i: integer; | |
begin | |
isPrime:=true; | |
//for i:=2 to n-1 do - как тебе больше нравится | |
for i:=2 to trunc(sqrt(n)) do | |
if n mod i = 0 then | |
isPrime := false; |
This file contains hidden or 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 | |
$key = "GDSHG4385743"; | |
$attempt = 0; | |
if (isset($_REQUEST["input"])) | |
{ | |
$attempt=isset($_REQUEST["attempt"])?(int)$_REQUEST["attempt"]:0; | |
$x = $_REQUEST["x"]; | |
$randNumber = encode($_REQUEST["randNumber"], $key); | |
if ($attempt<7) |
This file contains hidden or 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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Index1 | |
{ | |
public class Program | |
{ |
This file contains hidden or 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 | |
namespace Models; | |
abstract class EventSubject { | |
public static abstract function subjectName(); | |
public static function reverseName(){} | |
/*public static function subjectId() { |
This file contains hidden or 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 | |
namespace Models; | |
class Group extends EventSubject | |
{ | |
public static function subjectName() { | |
return 'group'; | |
} | |
public static function reverseName() { |
This file contains hidden or 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 | |
namespace Models\v2; | |
abstract class EventSubject extends \Models\EventSubject { | |
public static function schedule($id) { | |
$res = parent::schedule($id); | |
for ($w=0; $w<count($res); ++$w) { | |
for ($d=0; $d<count($res[$w]['days']); ++$d) { | |
for ($e=0; $e<count($res[$w]['days'][$d]['events']); ++$e) { |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body> | |
<div id="task1"> | |
<input id="t0" type="number" value="18.5"/> | |
</div> | |
<div id="task2"> | |
<input id="t0" type="number" value="18.5"/> | |
</div> |
This file contains hidden or 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 EndlessList { | |
companion object { | |
fun <T> get(recyclerView: RecyclerView, next: (Int) -> Observable<Response<T>>): Observable<Response<T>> { | |
var loading = false | |
var hasNextPage = true | |
return Observable.create<Int> { | |
val lm = recyclerView.layoutManager | |
val getLastVisible = if (lm is LinearLayoutManager) { | |
fun() = lm.findLastVisibleItemPosition() | |
} else if (lm is GridLayoutManager) { |
This file contains hidden or 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
// GameManager.java | |
public class GameManager { | |
private GameManager() {} | |
public static create(){ | |
GameManager gm = new GameManager(); | |
gm. // инициализируем созданием нового | |
return gm; | |
} | |
public static createFromStream(InputStream stream){ | |
GameManager gm = new GameManager(); |
OlderNewer