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
#!/usr/bin/env python | |
#!-*- coding: utf-8 -*- | |
import time | |
import sys | |
class TestObject: | |
def __del__(self): | |
print "Destructor occured..." |
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
#include <iostream> | |
#include <cmath> | |
#include <cstdlib> | |
using namespace std; | |
// Проверяет, четное ли число | |
bool is_even(int num) | |
{ | |
return num % 2 == 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
/* Дана последовательность, для */ | |
#include <iostream> | |
#include <cmath> | |
using namespace std; | |
// Найти значение выражения | |
double get_expr_val(double a, double b, double x, double y, double z) | |
{ | |
double part1 = log(a + b); | |
double part2 = pow(log(x + y), 3) / log(z + 2); |
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
program matr; | |
type | |
matrix = array [1..5, 1..3] of integer; | |
var | |
a: matrix; { двумерный массив } | |
i, j: integer; { индексы массива } | |
{ количество элементов массива, которые без остатка | |
делятся на собственный индекс (строки или столбца } |
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
program clock; | |
var | |
C: Integer; { часы } | |
M: Integer; { минуты } | |
S: Integer; { секунды } | |
NEW_C: Integer; { часы через 15 секунд } | |
NEW_M: Integer; { минуты через 15 секунд } | |
NEW_S: Integer; { секунды через 15 секунд } |
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
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
setlocale(LC_ALL, "Russian"); | |
int mass [15]; | |
int sr=0, j=0; | |
for (int i=0;i<15;i++) | |
{ |
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
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
setlocale(LC_ALL, "Russian"); | |
int mass [15]; | |
int sr, j=0; | |
for (int i=0;i<15;i++) | |
{ |
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 | |
$str = $_GET['someString']; | |
$resp = array( | |
'hash' => md5($str), | |
'price' => 1200, | |
'time' => time(), | |
); | |
header('Content-type: application/json'); |
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
SOURCES = addressbook.cpp \ | |
main.cpp | |
HEADERS = addressbook.h | |
# install | |
target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part1 | |
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part1.pro | |
sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part1 | |
INSTALLS += target sources |
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
/**************************************************************************** | |
** | |
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). | |
** All rights reserved. | |
** Contact: Nokia Corporation (qt-info@nokia.com) | |
** | |
** This file is part of the examples of the Qt Toolkit. | |
** | |
** $QT_BEGIN_LICENSE:BSD$ | |
** You may use this file under the terms of the BSD license as follows: |