Skip to content

Instantly share code, notes, and snippets.

View dmitrybubyakin's full-sized avatar

Dmitry Bubyakin dmitrybubyakin

View GitHub Profile
public int hashCode() {
int h = hash;
if (h == 0 && value.length > 0) {
char val[] = value;
for (int i = 0; i < value.length; i++) {
h = 31 * h + val[i];
}
hash = h;
}
#include <stdio.h>
#include <conio.h>
int main()
{
const int n = 10;
const char *msg[n] =
{
"1",
"2",
"3",
private void button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < s.Length; i++) s[i] = 0;
for (int i = 0; i < tf.Length; i++) tf[i] = 0;
for (int i = 0; i < 24; i++) tf[i + 1] = Convert.ToInt32(this.groupBox1.Controls["textBox" + (i + 1)].Text);
s[0] = tf[1] + tf[3] + tf[4] + tf[5] + tf[6] + tf[7] + tf[8] + tf[9] + tf[14] - tf[15] + 2 * tf[20];
s[1] = tf[2] + tf[12] + tf[19] + tf[10] - tf[11];
s[2] = tf[1] + tf[3] + tf[4] + tf[5] + tf[6] + tf[7] + tf[8] + tf[9] + tf[14] - tf[15] + tf[20];
s[3] = tf[1] + tf[3] + tf[4] + tf[5] + tf[6] + tf[7] + tf[9] + tf[14] + tf[20];
s[4] = tf[1] + tf[3] + tf[5] + tf[9] + tf[14] + tf[16] + tf[17] + tf[18] + tf[20];
private void button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < s.Length; i++) s[i] = 0;
for (int i = 0; i < tf.Length; i++) tf[i] = 0;
for (int i = 0; i < 24; i++) tf[i + 1] = Convert.ToInt32(this.groupBox1.Controls["textBox" + (i + 1)].Text);
s[0] = tf[1] + tf[3] + tf[4] + tf[5] + tf[6] + tf[7] + tf[8] + tf[9] + tf[14] - tf[15] + 2 * tf[20];
s[1] = tf[2] + tf[12] + tf[19] + tf[10] - tf[11];
s[2] = tf[1] + tf[3] + tf[4] + tf[5] + tf[6] + tf[7] + tf[8] + tf[9] + tf[14] - tf[15] + tf[20];
s[3] = tf[1] + tf[3] + tf[4] + tf[5] + tf[6] + tf[7] + tf[9] + tf[14] + tf[20];
s[4] = tf[1] + tf[3] + tf[5] + tf[9] + tf[14] + tf[16] + tf[17] + tf[18] + tf[20];
public void Click() {
int tf1 = Integer.parseInt(TF1.getText());
int tf2 = Integer.parseInt(TF2.getText());
int tf3 = Integer.parseInt(TF3.getText());
int tf4 = Integer.parseInt(TF4.getText());
int tf5 = Integer.parseInt(TF5.getText());
int tf6 = Integer.parseInt(TF6.getText());
int tf7 = Integer.parseInt(TF7.getText());
int tf8 = Integer.parseInt(TF8.getText());
int tf9 = Integer.parseInt(TF9.getText());
//В CPP файле поменяй это
void Lab::printres()
{
if (!data)return;//если где-то ошибка - выход
cout << "Исходная матрицы :" << endl;//выводим результаты
printm(m);//выводим матрицу
printf("Первое собственное значение = %0.6f\n", L1);
printf("Второе собственное значение = %0.6f\n", L2);
cout << "Полученный вектор :" << endl;
printv(h);//вектор
void Lab::printCheck()
{
double *Au = multvm(h, m);
double *Yu = new double[n];
double *T = new double[n];/////////////
for (int i = 0; i < n; i++)
Yu[i] = h[i] * L1;
cout << "Ah = Lh" << endl;
cout << "Ah :" << endl;
printv(Au);
<?
class template # создали класс
{ # зададим переменные
var $data = array(); # переменная для шаблонов
var $root = '.'; # каталог для шаблонов
<?
session_start();
header("Content-Type: text/html; charset=utf-8");
require("config.php");
require("creator.php");
require("db_action.php");
$db = new DataBase(DB_HOST,DB_USERNAME,DB_PASSWORD,DB_NAME);
$action = isset( $_GET['action'] ) ? $_GET['action'] : "homepage";
$username = isset( $_SESSION['username'] ) ? $_SESSION['username'] : "Гость";
$right = isset( $_SESSION['right'] ) ? $_SESSION['right'] : 4;#4 - гость
Привет Костя