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
Здравствуйте. Рады сообщить Вам, что сайт {SiteName} на движке {Engine} успешно создан {Date} Центром мониторинга и анализа веб-данных БГУ в рамках партнерской платформы METRICS. | |
Вход по FTP для размещения материалов доступен по адресу ftp://metrics.bsu.by, логину {ftp_login} и паролю {ftp_password}. Вы имеете права доступа на запись в папке {ftp_internal_folder}, содержимое которой непосредственно отображается на сайте. Доступ к административной панели (веб-интерфейсу) сайта осуществляется по адресу http://metrics.bsu.by:{PORT}, логину {CMS_login} и паролю {CMS_Password}. | |
Пожалуйста, измените пароль от CMS для вашего логина самостоятельно. Пароль от FTP остается фиксированным. Если вы осуществляете перенос существующего сайта, Вам понадобится в будущем сделать дамп базы и разместить его в одной из папок на сервере. После уведомления с Вашей стороны, будет осуществлено импортирование данных. При создании сайта обратите внимание на использование относительных ссылок (/a/b.jpg), вместо абсолютных (http://metric |
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
pid_t create_child(const char* pathname, const int uniq, const int time, const int times) { | |
pid_t pid = fork(); | |
int error; | |
if(!pid) { | |
printf("Child\n"); | |
error = execl("bin/child", "bin/child", | |
pathname, | |
(char *) &uniq, | |
(char *) &time, | |
(char *) ×, |
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
type MuCommand is (StartCommand, NextCommand, WriteAcc, ReadAcc, WriteRamAddress, | |
ReadRam, WriteRam, IncrementPC, ReadPC, WritePC, ReadROM, WriteTemp, ReadTemp, | |
ReadR0Address, AluCompare, CheckNC, JMP, NOPE, WriteBus, ReadPSW, WritePSW); | |
type MuState is array(0 to 15) of MuCommand; | |
type MuGraph is array(0 to 63) of MuState; | |
constant MovADataGraph : MuGraph := ( | |
(ReadPC, others => nope), | |
(IncrementPC, others => nope), | |
(WritePC, WriteBus, others => nope), |
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
@media only screen and (max-width:991px){ | |
h1{ | |
font-size:3em | |
} | |
p{ | |
font-size:1.3em | |
} | |
.nav-pills>li,.navbar-nav{ | |
font-size:1.5em | |
} |
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
class TasksWorkerFactory { | |
public function getWorker(Task $task){ | |
$task_type = get_class($task); | |
if(!array_key_exists($task_type, self::$map)) | |
throw new \Exception; | |
/** @var AbstractWorker $worker */ | |
$worker = new self::$map[$task_type]; | |
$worker->setTask($task); | |
return $worker; | |
} |
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
void * receiver(void * fake){ | |
Message message; | |
while(1){ | |
message = queue.get(messages_type); | |
printf(Messages::TEMPLATE, message.author, message.body); | |
} | |
} | |
void * sender(void * fake) { | |
while(1){ |
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 <sys/types.h> | |
#include <sys/ipc.h> | |
#include <sys/msg.h> | |
#include "queue.h" | |
Queue::Queue(char * pathname, int flags, int uniq){ | |
key_t key = ftok(pathname, uniq); | |
id = msgget(key, flags); | |
this->flags = flags; | |
} |
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 <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <pthread.h> |
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
lazy val x = { | |
print("(computing x) ") | |
//Doing some stuff... | |
42 | |
} | |
print("first") | |
println(x) | |
print("second") | |
println(x) |
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 bash | |
DUMP_DIR="/var/www/dumps" | |
cur_date=`date +%Y.%m.%d` | |
file=$(printf "dump.%s.sql" "$cur_date") | |
archive=$(printf "%s.gz" "$file") | |
mysqldump --host=%% --user=%% --password=%% % > $DUMP_DIR/$file | |
gzip -cf $DUMP_DIR/$file > $DUMP_DIR/$archive | |
rm $DUMP_DIR/$file |
OlderNewer