# All# python# wedfg# scope variable# interview# lexical environment# javascript# #algorithm# hoisting# good# print# java# coding shortcut# competitive coding# shorthand# loop tricks# sample# #c# gambling# primitives# algoritms# arrow-functions# javascriptintro# usefullinks# technical round# project# beetroot# reverse# array# copy# collection# test# i am printing hello world# #class# #js# #interview# map# lodash# scoping# async# prime numbers# python journey# weather app# easy way to remove duplicates# # #javascript# pho# possible ways of calculator app# var a = 10 function f(){ console.log(a) } f(); console.log(a);# gg# bank# as# palindrome# hello world basic intro# #python# pattern program# nodejs# key# concept of var, let and const# #helloworld# please give better ans# php# hello world# code review# string# d# javascript functions# php loop# s# fusionauth# c++# helloworld# hello, world# forloop# slice# adding two numbers# diamond# @python3# #python3# arraylistcourceimplemetnation# cpp# work# auto screenshot# #dsa# #recursion# #array# #java# bday# int number; : this line declares a variable to store the integer input the user# game# woocommerce# some testing publish# ios# test_idea# cliq# linkedlist# basic# typescript# image# tutorial to show some usage of the class arraylist# dart# test task# function# prints 'hello world in console# miu# final# python relationship between boolean and members ships operators# relationship between casesentive and indexing# wqdwef# f# sde# testing# week8# hi# game hangman java# wordpress# nginx# server# index.php# tmp# first# laravel# mysql# jquery# html# sockets# mutex# message# process# threads# c# os# system calls# kill# 19# reader writer# semaphores# mutual exclusion# concurrency# deadlock# phonepe# thread program# java-linked-list# junit# hello world program# hangman# goldman# resolved class not found exception# kotlin# lld# asa# suggested tags javascript function console log hello world programming basics# python function loop hello world code basics# calculator# dvoen

Latest from community today

# Данные рангов экспертов (каждый подсписок - оценки одного эксперта)
ranks = [
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
    [1, 10, 2, 3, 4, 5, 7, 6, 8, 9],
    [6, 1, 10, 2, 4, 7, 9, 3, 5, 8],
    [6, 3, 10, 5, 1, 8, 9, 2, 4, 7],
    [3, 1, 9, 2, 10, 4, 6, 5, 7, 8],
    [1, 2, 6, 3, 4, 5, 8, 7, 9, 10],
    [1, 2, 5, 4, 3, 6, 8, 7, 9, 10],
    [10, 8, 9, 6, 2, 5, 7, 1, 4, 3],
    [2, 7, 9, 3, 6, 10, 5, 1, 4, 8],
    [2, 8, 9, 3, 6, 10, 5, 1, 4, 7]
]

# Названия мессенджеров
messengers = {
    1: "WhatsApp",
    2: "WeChat",
    3: "FB Messenger",
    4: "Telegram",
    5: "Snapchat",
    6: "QQ",
    7: "Line",
    8: "Discord",
    9: "Zalo",
    10: "Momo"
}

num_messengers = len(messengers)
num_experts = len(ranks)

# 1. Суммарные ранги
total_ranks = {messengers[i+1]: 0 for i in range(num_messengers)}
for expert_ratings in ranks:
    for i, rating in enumerate(expert_ratings):
        total_ranks[messengers[i+1]] += rating

print("Суммарные ранги по мессенджерам:")
for messenger, total in total_ranks.items():
    print(f"{messenger}: {total}")

# 2. Метод Кондорсе — создание матрицы парных сравнений
pairwise_matrix = [[0]*num_messengers for _ in range(num_messengers)]

for i in range(num_messengers):
    for j in range(num_messengers):
        if i == j:
            continue
        count = 0
        for expert in ranks:
            if expert[i] < expert[j]:
                count += 1
        pairwise_matrix[i][j] = count

print("\nМатрица парных сравнений (число экспертов, предпочитающих строку столбцу):")
header = "\t" + "\t".join(messengers[i+1] for i in range(num_messengers))
print(header)
for i in range(num_messengers):
    row_name = messengers[i+1]
    row = []
    for j in range(num_messengers):
        if i == j:
            row.append("-")
        else:
            row.append(str(pairwise_matrix[i][j]))
    print(f"{row_name}\t" + "\t".join(row))

# Дополнительное — таблица отношений в виде 0/1
relation_matrix = [['-' if i == j else 0 for j in range(num_messengers)] for i in range(num_messengers)]

for i in range(num_messengers):
    for j in range(num_messengers):
        if i == j:
            continue
        if pairwise_matrix[i][j] > pairwise_matrix[j][i]:
            relation_matrix[i][j] = 1
        else:
            relation_matrix[i][j] = 0

print("\nТаблица отношений (0/1), где 1 — мессенджер строки побеждает у столбца:")
print(header)
for i in range(num_messengers):
    row_name = messengers[i+1]
    row = [str(relation_matrix[i][j]) for j in range(num_messengers)]
    print(f"{row_name}\t" + "\t".join(row))

# Подсчет побед каждого мессенджера по Кондорсе
condorcet_wins = [0]*num_messengers
for i in range(num_messengers):
    for j in range(num_messengers):
        if i == j:
            continue
        if pairwise_matrix[i][j] > pairwise_matrix[j][i]:
            condorcet_wins[i] += 1

max_wins = max(condorcet_wins)
condorcet_winners = [messengers[i+1] for i, wins in enumerate(condorcet_wins) if wins == max_wins]

print("\nКоличество побед в парных сравнениях по методу Кондорсе:")
for i in range(num_messengers):
    print(f"{messengers[i+1]}: {condorcet_wins[i]}")

print(f"\nЛучший мессенджер по методу Кондорсе: {', '.join(condorcet_winners)} (побед в парах: {max_wins})")

# 3. Метод Борда
# Баллы = n - ранг + 1, где n — количество мессенджеров
borda_scores = {messengers[i+1]: 0 for i in range(num_messengers)}

for expert_ratings in ranks:
    for i, rank in enumerate(expert_ratings):
        score = num_messengers - rank + 1  # обратный ранг
        borda_scores[messengers[i+1]] += score

print("\nБаллы по методу Борда:")
for messenger, score in borda_scores.items():
    print(f"{messenger}: {score}")

max_borda = max(borda_scores.values())
borda_winners = [m for m, s in borda_scores.items() if s == max_borda]

print(f"\nЛучший мессенджер по методу Борда: {', '.join(borda_winners)} (баллов: {max_borda})")
import java.io.*;
import java.util.*;

/*
  * To execute Java, please define "static void main" on a class
  * named Solution.
  *
  * If you need more classes, simply define them inline.
  */

class Solution {
  public static void main(String[] args) {
    ArrayList<String> strings = new ArrayList<String>();
    strings.add("Hello, World!");
    strings.add("Running Java " + Runtime.version().feature());

    for (String string : strings) {
      System.out.println(string);
    }
  }
}
function add(a, b) {
    return a + b;
}

function subtract(a, b) {
    return a - b;
}

function multiply(a, b) {
    return a * b;
}

function divide(a, b) {
    if (b === 0) {
        return "Error: Division by zero!";
    }
    return a / b;
}

// Example usage:
let num1 = 10;
let num2 = 5;

console.log("Addition:", add(num1, num2));
console.log("Subtraction:", subtract(num1, num2));
console.log("Multiplication:", multiply(num1, num2));
console.log("Division:", divide(num1, num2));
class Solution {
    public ListNode mergeKLists(ListNode[] lists) {
        
        if(lists.length<1) {
            return null;
        }


        ListNode result = new ListNode(Integer.MIN_VALUE);

        for(int i=0; i<lists.length; i++) {
          	// method from previous question
            mergeTwoLists(result, lists[i]);
        }

        return result.next;
	}
}
server {
    server_name bfmk.hu;
    root /var/www/bfmk.hu/web/;
    index index.php index.html;

    # WordPress permalink kezelés
    location / {
        try_files $uri $uri/ /index.php?$args;  # <-- Ez a kulcs!
    }

    # PHP feldolgozás
    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php8.x-fpm.sock;  # vagy 127.0.0.1:9000
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}
<?php
// Get the current day of the week (0 = Sunday, 6 = Saturday)
$dayOfWeek = date('w');

// The base URL for your images on GitHub
$baseUrl = "https://raw.githubusercontent.com/HeySayHi/HeySayHi/main/";

$imageUrl = "";

switch ($dayOfWeek) {
    case 0: // Sunday
        $imageUrl = $baseUrl . "sunday-image.gif"; 
        break;
    case 1: // Monday
        $imageUrl = $baseUrl . "monday-image.gif"; 
        break;
    case 2: // Tuesday
        $imageUrl = $baseUrl . "tuesday-image.gif"; 
        break;
    case 3: // Wednesday
        $imageUrl = $baseUrl . "wednesday-image.gif"; 
        break;
    case 4: // Thursday
        $imageUrl = $baseUrl . "thursday-image.gif";
        break;
    case 5: // Friday
        $imageUrl = $baseUrl . "friday-image.gif"; 
        break;
    case 6: // Saturday
        $imageUrl = $baseUrl . "Saturday.gif"; 
        break;
    default:
        $imageUrl = $baseUrl . "default-image.gif"; 
        break;
}

// Redirect the browser to the correct image URL
header("Location: " . $imageUrl);
exit();
?>

Featured content