LINUX.ORG.RU

Сообщения Dron

 

Я гик, но не работаю в IT.

Многие по роду своей деятельности на LOR работают в сфере IT, но мне кажется ещё больше народу так или иначе любят заниматься компьютерной техникой,программировать,самостоятельно учатся,увлекаются свободным софтом и даже пилят свой ,мантейнерят пакеты и прочее. Но работают и имеют «если вообще имеют » образование не как не связанное с IT. К примеру мне интересно заниматься программированием, изучением работы пк и тому подобным, но я не имею технического образования и работаю на хлебозаводе ,пеку хлеб ,не совсем пеку, а слежу за делителем который разделывает тесто. Вообщем как то так. Много ли таких как я? тут на LOR.

 ,

Dron
()

Кто просрал последнюю лекцию, Курсы информационных технологий,качаем с торентов.

http://rghost.ru/41155515 и скажем спасибо Magistr в жабере kit3@conference.ya.ru

Dron
()

Скачать трансляцию kit

Вообщем сегодня будет очередная трансляция kit (http://events.yandex.ru/events/kit/) Но я не смогу посмотреть, так как выкладывать видео они не собираются очень долго, решил написать скрипт который бы его скачал ,но тут я круто обломался так как даже простое статическое видео скачать проблематично. Ситуация такая, будет трансляция, ссылка не известна (прямая), да и вообще как потоковое видео слить?

Dron
()

Идёт трансляция Курса информационных технологий

 

Dron
()

Это баг или я дурак?

Простенький кусочек кода. С какого хрена результаты разные всегда?

#include <stdio.h>
void csilus(int byte)
{

float bit=8*byte;//Количество бит
float degree=bit;//степень
float res=2;     //Модуль

while(degree!=0)
  {
    res=res*bit;
    degree--;
  };
 
   printf("\n[%d]____[%d]\n",res,res);
       
};


int main()
{    
   
     csilus(sizeof(unsigned int));

     return 0;
};

 

Dron
()

Чем протестировать CPU, GPU ?

Собственно интересует результат чтоб в Флопсах был.

Dron
()

Падение частоты процессора

Вообщем сидел на Debian stable c разогнанным процессором до 3Гг всё прекрасно было , обновился до unstable , теперь где то энергосбережение мне мешает и опускает частоту до 800 мегагерц . Что нужно вырубить чтобы частота проца не менялась?

Dron
()

Помогите поправить код си

#define MAXI 120000
/////////////////////////
int  line=0;
int  max_line=0;
char sh;
char len[MAXI];
char max_len[MAXI];
/////////////////////////

void copyline(char line_in[],char line_out[],int size_line)

{

  int counter=0;
  while(counter<12000-1)
    {
      max_len[counter]=len[counter];
      counter++;
    };
  max_len[counter++]='\0';
  line=0;
};



char get_line()
{

  while((sh=getchar())!=EOF)
    {
      if(sh!='\n')
        {
          len[line]=sh;
          line++;
        };
      if(sh=='\n' && line>max_line)
        {
          max_line=line;
          copyline(max_len,len,line);
        };
      if(sh=='q') break;

    };

};

///////////////////////
int main()

{

  get_line();

  printf("%d\n%s\n",max_line,max_len);




  return 0;
};

Вывод самой длинной строки. Почему если вводить

0
00
000
0000
00000
000000
q
выводит :
6
000000
всё правильно, а если что-то типа этого

rugerkr
iwrghvuifhviuwrh
irvhuiwrh
werilvuhfui
q
выводит:
20
irvhuiwrhwerilvuhfui

то есть строки сливаются и число символов не верно.

 

Dron
()

Доступ к пк за vpn через MidpSSH

Собственно есть пк с инетом через pptp то биш vpn .

И есть сраненький телефон с MidpSSH.

Может можно как нибудь получить доступ к пк ?

Я уже голову сломал.

Dron
()

Программно подать звук на вход из файла.

Вообщем микрофона нет, а прямо сейчас позарез надо на вход микрофона подать звук. Может как транслировать выходной поток звука на вход? Debian stable

Dron
()

Systemd за и против (тихо мирно и спокойно)

Собственно я инертен, почитал про этот Systemd немного так вроде годная вещь при определённом подходе, или я не прав? Единственный дурдом как я понял это снос привычных скриптов запуска и тп., или я не прав? Вообщем объективно разжевать можете, желательно с реальными примерами, а не с обсираниями восхищениями с потолка.

 

Dron
()

А чего лор падал?

Кто начудил?

Перемещено hibou из general

Dron
()

Какой usb программатор собрать для avr?

Начал осваивать микроконтроллеры atmel, линейки mega в частности. Покупать программатор не хотелось собрал по быстрому stk200 http://imageshost.ru/photo/1045908/id2266466.html мать хоть и новая, но есть порт lpt ,поигрался с avrdude помигал диодами , всё понравилось.Просто и удобно.Но так как lpt исчезает,хочется usb программатор собрать на тех же ATmegaXXX .Вроде как USBasp приглянулся. Кто чем пользуется? Кто что советует? Мк. только осваиваю и на кирпичи нарываться не хочется лишний раз.

 , ,

Dron
()

Как поменять разрешение экрана ?

Вобщем часто переключаюсь ctrl+alt+f1 в терминал но вот разрешение там ~640x480 cоотвецтвенно шрифт огромен. как поменять?

Debian 6.0

Dron
()

А кто пробовал запускать образ винчестера снятый dd в virtualbox?

По идее должно пахать ?

Dron
()

Посоветуйте поисковую машину

Кто чем пользуется? В локальной сети тройка сайтов и ftp с файло помойкой вот надо как то поиск по всему этому устроить. Требования: Пох на чём написана, пох использует базы или нет, поиск по именам и внутри фалов вывод результатов аля яндекс,гугл. поиск по ftp. Да я знаю что их много,да мне лень все их пробовать,да я не в состоянии сам написать скрипты,да я умею пользоваться гуглом. Да я ищу готовое (или почти готовое) и проверенное решение. Всем спасибо.

Желательно что нибудь gnuтое или bsdнутое.

Dron
()

ftpsync вылетает

Вообщем решил у себя развернуть полное зеркало Debian и пользуясь их рекомендациями использовать скрипт ftpsync вроде настроил запустил синхронизация завелась , но происходят вылеты ,зеркало то здоровое а у меня только гигов 16 слилось надоело уже.

tpsync.conf

########################################################################
########################################################################
## This is a sample configuration file for the ftpsync mirror script. ##
## Most of the values are commented out and just shown here for       ##
## completeness, together with their default value.                   ##
########################################################################
########################################################################

## Mirrorname. This is used for things like the trace file and should always
## be the full hostname of the mirror.
MIRRORNAME=`hostname -f`

## Destination of the mirrored files. Should be an empty directory.
## CAREFUL, this directory will contain the mirror. Everything else
## that might have happened to be in there WILL BE GONE after the mirror sync!
TO="/home/dron/EFF/FILES/APT/mirrors/debian/"

## The upstream name of the rsync share.
##
## You can find out what share names your upstream mirror supports by running
## rsync YOURUPSTREAMSERVER::
## (You might have to export RSYNC_USER/RSYNC_PASSWORD for this to work)
RSYNC_PATH="debian"

## The host we mirror from
RSYNC_HOST=ftp.ru.debian.org

## In case we need a user to access the rsync share at our upstream host
RSYNC_USER=userf

## If we need a user we also need a password
RSYNC_PASSWORD=не скажу

## In which directory should logfiles end up
## Note that BASEDIR defaults to $HOME, but can be set before calling the
## ftpsync script to any value you want (for example using pam_env)
LOGDIR="${BASEDIR}/log"

## Name of our own logfile.
## Note that ${NAME} is set by the ftpsync script depending on the way it
## is called. See README for a description of the multi-archive capability
## and better always include ${NAME} in this path.
LOG="${LOGDIR}/${NAME}.log"

## The script can send logs (or error messages) to a mail address.
## If this is unset it will default to the local root user unless it is run
## on a .debian.org machine where it will default to the mirroradm people.
#MAILTO="root"

## If you do want a mail about every single sync, set this to false
## Everything else will only send mails if a mirror sync fails
ERRORSONLY="true"

## If you want the logs to also include output of rsync, set this to true.
## Careful, the logs can get pretty big, especially if it is the first mirror
## run
FULLLOGS="false"

## If you do want to exclude files from the mirror run, put --exclude statements here.
## See rsync(1) for the exact syntax, these are passed to rsync as written here.
## DO NOT TRY TO EXCLUDE ARCHITECTURES OR SUITES WITH THIS, IT WILL NOT WORK!
EXCLUDE=""

## If you do want to exclude an architecture, this is for you.
## Use as space seperated list.
## Possible values are:
## alpha, amd64, arm, armel, armhf, hppa, hurd-i386, i386, ia64, kfreebsd-amd64,
## kfreebsd-i386, m68k, mipsel, mips, powerpc, s390, s390x, sh, sparc and source
## eg. ARCH_EXCLUDE="alpha arm armel mipsel mips s390 sparc"
## An unset value will mirror all architectures (default!)
ARCH_EXCLUDE=""

## Do we have leaf mirror to signal we are done and they should sync?
## If so set it to true and make sure you configure runmirrors.mirrors
## and runmirrors.conf for your need.
HUB=false

## We do create three logfiles for every run. To save space we rotate them, this
## defines how many we keep
LOGROTATE=14

## Our own lockfile (only one sync should run at any time)
LOCK="${TO}/Archive-Update-in-Progress-${MIRRORNAME}"

# Timeout for the lockfile, in case we have bash older than v4 (and no /proc)
 LOCKTIMEOUT=${LOCKTIMEOUT:-3600}

## The following file is used to make sure we will end up with a correctly
## synced mirror even if we get multiple pushes in a short timeframe
UPDATEREQUIRED="${TO}/Archive-Update-Required-${MIRRORNAME}"

## The trace file is used by a mirror check tool to see when we last
## had a successful mirror sync. Make sure that it always ends up in
## project/trace and always shows the full hostname.
## This is *relative* to ${TO}
TRACE="project/trace/${MIRRORNAME}"

## The trace file can have different format/contents. Here you can select
## what it will be.
## Possible values are
## "full"  - all information
## "terse" - basic, timestamp only (date -u)
## "touch" - just touch the file in existance
## "none"  - no tracefile at all
##
## Default and required value for Debian mirrors is full.
EXTENDEDTRACE="full"

## We sync our mirror using rsync (everything else would be insane), so
## we need a few options set.
## The rsync program
RSYNC=rsync

## Extra rsync options as defined by the local admin.
## There is no default by ftpsync.
##
## Please note that these options are added to EVERY rsync call.
## Also note that these are added at the beginning of the rsync call, as
## the very first set of options.
## Please ensure you do not add a conflict with the usual rsync options as
## shown below.
 RSYNC_EXTRA=""

## limit I/O bandwidth. Value is KBytes per second, unset or 0 means unlimited
RSYNC_BW="0"

## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T!
## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T!
## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T!
## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T!

## Default rsync options every rsync invocation sees.
RSYNC_OPTIONS="-prltvHSB8192 --timeout 3600 --stats --exclude Archive-Update-in-Progress-${MIRRORNAME} --exclude ${TRACE} --exclude Archive-Update-Required-${MIRRORNAME}"

## Options the first pass gets. We do not want the Packages/Source indices
## here, and we also do not want to delete any files yet.
RSYNC_OPTIONS1="--include 'installer-*/**/*' --include '*/' --exclude 'dists/**/*' --exclude ls-lR*"

## Options the second pass gets. Now we want the Packages/Source indices too
## and we also want to delete files. We also want to delete files that are
## excluded.
RSYNC_OPTIONS2="--max-delete=40000 --delay-updates --delete --delete-after --delete-excluded"

## You may establish the connection via a web proxy by setting the environment
## variable RSYNC_PROXY to a hostname:port pair pointing to your web proxy.  Note
## that your web proxy's configuration must support proxy connections to port 873.
# RSYNC_PROXY=


## The following three options are used in case we want to "callback" the host
## we got pushed from.
#CALLBACKUSER="archvsync"
#CALLBACKHOST="none"
#CALLBACKKEY="none"


## Hook scripts can be run at various places during the sync.
## Leave them blank if you don't want any
## Hook1: After lock is acquired, before first rsync
## Hook2: After first rsync, if successful
## Hook3: After second rsync, if successful
## Hook4: Right before leaf mirror triggering
## Hook5: After leaf mirror trigger, only if we have slave mirrors (HUB=true)
##
## Note that Hook3 and Hook4 are likely to be called directly after each other.
## Difference is: Hook3 is called *every* time the second rsync was successful,
## but even if the mirroring needs to re-run thanks to a second push.
## Hook4 is only effective if we are done with mirroring.
#HOOK1=
#HOOK2=
#HOOK3=
#HOOK4=
#HOOK5=

ftpsync.log

Июл 19 11:14:42 gnu ftpsync-gnu[2072]: Mirrorsync start
Июл 19 11:14:42 gnu ftpsync-gnu[2072]: Running mirrorsync, update is required, /home/dron/EFF/FILES/APT/mirrors/debian//Archive-Update-Required-gnu exists
Июл 19 11:14:42 gnu ftpsync-gnu[2072]: Running stage1: rsync  --bwlimit=0 -prltvHSB8192 --timeout 3600 --stats --exclude Archive-Update-in-Progress-gnu --exclude project/trace/gnu --exclude Archive-Update-Required-gnu --include 'installer-*/**/*' --include '*/' --exclude 'dists/**/*' --exclude ls-lR*  --exclude .~tmp~/   dron@ftp.ru.debian.org::debian /home/dron/EFF/FILES/APT/mirrors/debian/
Июл 19 11:36:35 gnu ftpsync-gnu[2072]: Mirrorsync done
Июл 19 11:36:35 gnu ftpsync-gnu[2072]: Rsync transfer speed:  KB/s
Июл 19 11:36:36 gnu ftpsync-gnu[2072]: Back from rsync with returncode 12
Июл 19 11:36:36 gnu ftpsync-gnu[2072]: ERROR: Sync step 1 went wrong, got errorcode 12. Logfile: /home/dron/log/ftpsync.log

rsync-ftpsync.error

rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at io.c(760) [receiver=3.0.7]
rsync: connection unexpectedly closed (242 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [generator=3.0.7]

rsync-ftpsync.log

ну этот мусор приводить не буду 

Ну из логов собственно ясно что ошибка чтения там , он ожидает потом ему надоедает и он обрывает связь. Но вот с фигали это происходит я не въеду ,гуглил не нашёл ничего адекватного.

Dron
()

Есть ли какие открытые видеогалереи на вроде фотогалереи Piwigo

Собственно хочется автоматической генерации и удобного управления.

Dron
()

массовое переименование

Вообщем надо заменить часть имени в куче файлов раскиданных по директориям, но чёта rename не как не хочет этого делать. Имена имеют вид.

тратата-слово1-тратата

А надо.

тратата-слово2-тратата

rename 's/слово1/слово2/g' *
Dron
()

Поддерживают ли свободные дрова Radeon hd 6850 ?

Собственно Debian testing c каталистом не дружит. Или можно подружить как то ?А то думается опять на stable переползу там спокойнее как то.

Dron
()

RSS подписка на новые темы