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
Calendar calendar = Calendar.getInstance(); // Объект Calendar | |
calendar.setTimeInMillis(timeStamp * 1000); // Получение времени | |
TimeZone tz = TimeZone.getDefault(); // Часовой пояс устройства | |
// Поправка на часовой пояс устройства | |
calendar.add(Calendar.MILLISECOND, tz.getOffset( calendar.getTimeInMillis() )); |
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
// Игнорирование запроса разрешения на старых ОС | |
if (android.os.Build.VERSION.SDK_INT < 23) { | |
requestPermissions( | |
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, | |
SAVE_IMAGE_PERMISSION_REQUEST_CODE); | |
doodleView.saveImage(); | |
return; | |
} |
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 | |
{$a = 123;} | |
echo $a; | |
?> |
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 | |
function hi() { | |
echo "hi!<br>"; | |
return 1; | |
} | |
$a = 1; | |
if ($a == 1 or hi() == 1) // hi() не вычисляется | |
echo "amazing!<br>"; |
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 | |
$a = true; | |
$b = false; | |
echo ($a || $a & $b); // по порядку - false, иначе true (Выводится true) | |
?> |
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 | |
$came_from = $_SERVER['HTTP_REFERER']; | |
echo $came_from; | |
?> |
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
[.ShellClassInfo] | |
LocalizedResourceName=Работа | |
IconFile=%SystemRoot%\system32\shell32.dll |
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 | |
$var = 2; | |
echo $var--; | |
echo $var; | |
?> |
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 | |
$teám = array('Bill', 'Mary', 'Mike', 'Chris', 'Anne'); | |
echo $teám[1]; | |
?> |
NewerOlder