Ir ao conteúdo
  • Cadastre-se

wellingtonmoreno

Membro Pleno
  • Posts

    76
  • Cadastrado em

  • Última visita

  1. Eu abro o Firefox e outros programas que utiliza a internet e o ícone de rede exibe sem acesso a internet já usei esses dois driver e nao funciona
  2. Como instalar Oneplay da Fluendo no Fedora 31 O que eu devo fazer para instalar?
  3. como eu faço para exibir imagem de projetor ou videolink com o linux debian 9?
  4. Eu vou utilizar o editor de pdf no Linux Debian 9 Eu vou utilizá-lo para editar principalmente texto e raramente usar pra editar imagens Qual vocês me indicam?
  5. Alguém já utilizou o serviço dessas empresas? : www.mobofix.com.br www.zeusinformatica.com.br www.bgprom.com.br Qual é a melhor? Utilizarei o serviço de conserto de placa-mãe
  6. Com 15000 reais da para comprar uma tv 4k grande e o xbox one x junto e sobra dinheiro ainda O xbox one x gera imagem em 4k
  7. A IDE do Netbeans no Linux Debian apresenta o seguinte erro mostrado na foto ao criar o novo projeto em Java Ja tentei desinstalar e reinstalar o Netbeans no Debian e continua o erro
  8. Acabei comprando o Visus TV Extreme USB a alguns meses Funciona bem direito no Windows mas nao consegui fazer funcionar no Linux Debian ainda Os software que acompanha o Visus TV Extreme USB nao possue versao para linux No Windows funciona bem a parte de captura com o aparelho da foto acima Ja pra gravar tv tanto principalmente digital ou analogica é preciso usa-lo com antena externa pata ter bom desempenho Eu sei que o topico é antigo mas agora pode considera-lo encerrado
  9. Esse codigo pertence a um arquivo .pl e queria sabe que aplicativo se executa, eu acho que é mysql mas nao tenho certeza disto ou é Perl Script? Link do procedimento que preciso fazer: https://www.mythtv.org/wiki/Database_Backup_and_Restore Codigo abaixo: #!/usr/bin/perl -w # # mythconverg_restore.pl # # Restores a backup of the MythTV database. # # For details, see: # mythconverg_restore.pl --help # Includes use Getopt::Long; use File::Temp qw/ tempfile /; # Script info $NAME = 'MythTV Database Restore Script'; $VERSION = '1.0.18'; my @files = <$backup_conf{'directory'}/$backup_conf{'filename'}*>; @files = grep(!/.*mythconverg_(backup|restore).*\.pl$/, @files); my $num_files = @files; if ($num_files < 1) { verbose($verbose_level_error, 'ERROR: Unable to find any backup files in'. ' DBBackupDir and none specified.'); } else { my @sorted_files = sort { lc($b) cmp lc($a) } @files; $backup_conf{'filename'} = $sorted_files[0]; $backup_conf{'filename'} =~ s#^$backup_conf{'directory'}/?##; verbose($verbose_level_debug, 'Using database backup file:', "$backup_conf{'directory'}/$backup_conf{'filename'}"); } } if (!-e "$backup_conf{'directory'}/$backup_conf{'filename'}") { my $temp_filename = $backup_conf{'filename'}; # Perhaps the user specified some unnecessary path information in the # filename (i.e. using the shell's filename completion) $temp_filename =~ s#^.*/##; if (-e "$backup_conf{'directory'}/$temp_filename") { $backup_conf{'filename'} = $temp_filename; } else { verbose($verbose_level_error, '', 'ERROR: The specified backup file does not exist.', "$backup_conf{'directory'}/$backup_conf{'filename'}"); die("\nInvalid backup filename, stopped"); } } if ((-d "$backup_conf{'directory'}/$backup_conf{'filename'}") || (-p "$backup_conf{'directory'}/$backup_conf{'filename'}") || (-S "$backup_conf{'directory'}/$backup_conf{'filename'}") || (-b "$backup_conf{'directory'}/$backup_conf{'filename'}") || (-c "$backup_conf{'directory'}/$backup_conf{'filename'}") || (!-s "$backup_conf{'directory'}/$backup_conf{'filename'}")) { verbose($verbose_level_error, '', 'ERROR: The specified backup file is empty or is'. ' not a file.', "$backup_conf{'directory'}/$backup_conf{'filename'}"); die("\nInvalid backup filename, stopped"); } if (!-r "$backup_conf{'directory'}/$backup_conf{'filename'}") { verbose($verbose_level_error, '', 'ERROR: The specified backup file cannot be read.'); die("\nInvalid backup filename, stopped"); } if (!$mysql_conf{'db_name'}) { verbose($verbose_level_debug, '', "WARNING: DBName not specified. Using $d_db_name"); $mysql_conf{'db_name'} = $d_db_name; } } sub check_config { verbose($verbose_level_debug, '', 'Checking configuration.'); sub connect_to_database { my $use_db = shift; my $show_errors = shift; my $result = 1; my $connect_string = 'dbi:mysql:database='; if ($use_db) { $connect_string .= $mysql_conf{'db_name'}; } $connect_string .= ":host=$mysql_conf{'db_host'}"; $dbh->disconnect if (defined($dbh)); $dbh = DBI->connect($connect_string, "$mysql_conf{'db_user'}", "$mysql_conf{'db_pass'}", { PrintError => 0 }); $result = 0 if (!defined($dbh)); if ($show_errors && !defined($dbh)) { verbose($verbose_level_always, '', 'Unable to connect to database.', " database: $mysql_conf{'db_name'}", " host: $mysql_conf{'db_host'}", " username: $mysql_conf{'db_user'}" ); if ($debug < $verbose_level_debug) { verbose($verbose_level_always, 'To see the password used, please re-run the script '. 'with the --verbose', 'argument.'); } # Connection issues will only occur with improper user configuration # Because they should be rare, output the password with --verbose verbose($verbose_level_debug, " password: $mysql_conf{'db_pass'}"); verbose($verbose_level_always, '', 'Please check your configuration files to verify the'. ' database connection', 'information is correct. The files that are used to'. ' retrieve connection', 'information are prefixed with "parsing" in the "Parsing'. ' configuration files"', 'section of the --verbose output.'); verbose($verbose_level_always, '', 'Also note that any [client] or [mysql] password'. ' specified in the MySQL options', 'file (/etc/my.cnf or /etc/mysql/my.cnf or ~/.my.cnf)'. ' will take precedence over', 'the password specified in the MythTV configuration'. ' files.'); } return $result; } sub is_database_empty { my $result = 1; connect_to_database(1, 1); if (!defined($dbh)) { verbose($verbose_level_error, '', 'ERROR: Unable to connect to database.'); return -1; } if (defined($dbh)) { my $sth = $dbh->table_info('', '', '', 'TABLE'); my $num_tables = keys %{$sth->fetchall_hashref('TABLE_NAME')}; verbose($verbose_level_debug, '', "Found $num_tables tables in the database."); if ($num_tables > 0) { if (!defined($change_hostname) && !defined($partial_restore)) { verbose($verbose_level_debug, 'WARNING: Database not empty.'); } $result = 0; } } return $result; } sub create_initial_database { return 0 if (!$create_database && !$drop_database); my $database_exists = (connect_to_database(1, 0) && defined($dbh)); if ($database_exists) { if ($drop_database && !$create_database) { verbose($verbose_level_error, '', 'ERROR: Refusing to drop the database without'. ' the --create_database argument.', 'If you really want to drop the database, please '. 're-run the script and specify', 'the --create_database argument, too.'); return 2; } } else { if (!$create_database) { verbose($verbose_level_error, '', 'ERROR: The database does not exist.'); return 1; } } verbose($verbose_level_debug, '', 'Preparing initial database.'); my ($query, $sth); if ($database_exists && $drop_database) { verbose($verbose_level_debug, 'Dropping database.'); connect_to_database(0, 1); if (!defined($dbh)) { verbose($verbose_level_error, '', 'ERROR: Unable to connect to database.'); return -1; } $query = qq{DROP DATABASE $mysql_conf{'db_name'};}; $sth = $dbh->prepare($query); if (! $sth->execute()) { verbose($verbose_level_error, '', 'ERROR: Unable to drop database.', $sth->errstr); return -2; } } connect_to_database(0, 1) if (!defined($dbh)); if (!defined($dbh)) { verbose($verbose_level_error, '', 'ERROR: Unable to connect to database.'); return -1; } verbose($verbose_level_debug, 'Creating database.'); $query = qq{CREATE DATABASE $mysql_conf{'db_name'};}; $sth = $dbh->prepare($query); if (! $sth->execute()) { verbose($verbose_level_error, '', 'ERROR: Unable to create database.', $sth->errstr); return -4; } verbose($verbose_level_debug, 'Setting database character set.'); $query = qq{ALTER DATABASE $mysql_conf{'db_name'} DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;}; $sth = $dbh->prepare($query); if (! $sth->execute()) { verbose($verbose_level_error, '', 'ERROR: Unable to create database.', $sth->errstr); return -8; } return 0; } sub check_database_libs { # Try to load the DBI library if available (but don't require it) BEGIN { our $has_dbi = 1; eval 'use DBI;'; if ($@) { $has_dbi = 0; } } verbose($verbose_level_debug, '', 'DBI is not installed.') if (!$has_dbi); # Try to load the DBD::mysql library if available (but don't # require it) BEGIN { our $has_dbd = 1; eval 'use DBD::mysql;'; if ($@) { $has_dbd = 0; } } verbose($verbose_level_debug, '', 'DBD::mysql is not installed.') if (!$has_dbd); return ($has_dbi + $has_dbd); } sub check_database { my $have_database_libs = check_database_libs; if ($have_database_libs < 2) { if ($create_database || $drop_database) { verbose($verbose_level_error, '', 'ERROR: Unable to drop or create the initial '. 'database without Perl database', ' libraries.', 'Please ensure the Perl DBI and DBD::mysql modules'. ' are installed.'); die("\nPerl database libraries missing, stopped"); } if ($change_hostname) { verbose($verbose_level_error, '', 'ERROR: Unable to change hostname without Perl'. ' database libraries.', 'Please ensure the Perl DBI and DBD::mysql modules'. ' are installed.'); die("\nPerl database libraries missing, stopped"); } else { verbose($verbose_level_debug, 'Blindly assuming your database is prepared for a'. ' restore. For better checking,', 'please ensure the Perl DBI and DBD::mysql modules'. ' are installed.'); return 1; } } # DBI/DBD::mysql are available; check the DB status verbose($verbose_level_debug, '', 'Checking database.'); my $initial_database = create_initial_database; if ($initial_database) { return 0; } my $database_empty = is_database_empty; if ($database_empty == -1) { # Unable to connect to database return 0; } if ($change_hostname) { if ($database_empty) { verbose($verbose_level_error, '', 'ERROR: Unable to change hostname. The database'. ' is empty.', ' Please restore a backup, first, then re-run'. ' this script.'); return 0; } } elsif ($partial_restore) { if ($database_empty) { verbose($verbose_level_error, '', 'ERROR: Unable to do a partial restore. The'. ' database is empty.', ' Please run mythtv-setup, first, then re-run'. ' this script.'); return 0; } } else { if (!$database_empty) { verbose($verbose_level_error, '', 'ERROR: Unable to do a full restore. The'. ' database contains data.'); return 0; } } return 1; } sub is_gzipped { # Simple magic number verification. # This naive approach works without requiring File::MMagic or any other # modules. my $result = 0; my $magic_number; my $gzip_magic_number = pack("C*", 0x1f, 0x8b); open(BACKUPFILE, "$backup_conf{'directory'}/$backup_conf{'filename'}") or return $result; binmode(BACKUPFILE); read(BACKUPFILE, $magic_number, 2); close(BACKUPFILE); return ($gzip_magic_number eq $magic_number); } # Though it's possible to uncompress the file without writing the uncompressed # data to a file, doing so is complicated by supporting the use of # IO::Uncompress::Gunzip /and/ external uncompress programs. Also, # uncompressing the file separately allows for easier and more precise error # reporting. sub uncompress_backup_file { if (($d_uncompress eq $uncompress) || ('gunzip' eq $uncompress)) { if (!is_gzipped) { verbose($verbose_level_debug, '', 'Backup file is uncompressed.'); return 0; } verbose($verbose_level_debug, '', 'Backup file is compressed.'); # Try to load the IO::Uncompress::Gunzip library if available (but # don't require it) BEGIN { our $has_uncompress_gunzip = 1; # Though this does nothing, it prevents an invalid "only used # once" warning that occurs for users without IO::Uncompress # installed. undef $GunzipError; eval 'use IO::Uncompress::Gunzip qw(gunzip $GunzipError);'; if ($@) { $has_uncompress_gunzip = 0; } } if (!$has_uncompress_gunzip) { verbose($verbose_level_debug, ' - IO::Uncompress::Gunzip is not installed.'); } else { verbose($verbose_level_debug, ' - Uncompressing backup file with'. ' IO::Uncompress::Gunzip.'); my ($bfh, $temp_backup_filename) = tempfile(UNLINK => 1); my $result = gunzip( "$backup_conf{'directory'}/$backup_conf{'filename'}" => $bfh); if ((defined($result)) && (-f "$temp_backup_filename") && (-r "$temp_backup_filename") && (-s "$temp_backup_filename")) { $backup_conf{'directory'} = ''; $backup_conf{'filename'} = "$temp_backup_filename"; return 0; } verbose($verbose_level_error, " ERROR: $GunzipError"); } } else { verbose($verbose_level_debug, '', 'Unrecognized uncompress program.'. ' Assuming backup file is compressed.', ' - If the file is not compressed, please do not specify'. ' a custom uncompress', ' program name.'); } # Try to uncompress the file with the uncompress binary. # With the approach, the original backup file will be uncompressed and # left uncompressed. my $safe_uncompress = $uncompress; $safe_uncompress =~ s/'/'\\''/sg; verbose($verbose_level_debug, " - Uncompressing backup file with $uncompress.", ' The original backup file will be left uncompressed.'. ' Please recompress,', ' if desired.'); my $backup_path = "$backup_conf{'directory'}/$backup_conf{'filename'}"; $backup_path =~ s/'/'\\''/sg; my $output = `'$safe_uncompress' '$backup_path' 2>&1`; my $exit = $? >> 8; verbose($verbose_level_debug, '', "$uncompress exited with status: $exit"); if ($exit) { verbose($verbose_level_debug, "$uncompress output:", $output); } else { if (!-r "$backup_conf{'directory'}/$backup_conf{'filename'}") { # Assume the final extension was removed by uncompressing. $backup_conf{'filename'} =~ s/\.\w+$//; if (!-r "$backup_conf{'directory'}/$backup_conf{'filename'}") { verbose($verbose_level_error, '', 'ERROR: Unable to find uncompressed backup file.'); die("\nInvalid backup filename, stopped"); } } } return $exit; } sub do_hostname_change { my $exit = 0; if (!$new_hostname) { $exit++; verbose($verbose_level_error, '', 'ERROR: Cannot change hostname without --new_hostname'. ' value.'); } if (!$old_hostname) { $exit++; verbose($verbose_level_error, '', 'ERROR: Cannot change hostname without --old_hostname'. ' value.'); } if ($exit > 0) { die("\nInvalid --old/--new_hostname value(s) for". ' --change_hostname, stopped'); } # Get a list of all tables in the DB. if (defined($dbh)) { my $num_tables = 0; my $sth_tables; my $table_cat; my $table_schema; my $table_name; my $sth_columns; my $column_name; my $query; my $sth_update; my $result; $sth_tables = $dbh->table_info('', '', '', 'TABLE'); while (my $table = $sth_tables->fetchrow_hashref) { # Loop over all tables in the DB, checking for a hostname column. $num_tables++; $table_cat = $table->{'TABLE_CAT'}; $table_schema = $table->{'TABLE_SCHEM'}; $table_name = $table->{'TABLE_NAME'}; $sth_columns = $dbh->column_info($table_cat, $table_schema, $table_name, '%'); while (my $column = $sth_columns->fetchrow_hashref) { # If a hostname column exists, change its value. $column_name = $column->{'COLUMN_NAME'}; if (($column_name eq 'hostname') || ($column_name eq 'host')) { verbose($verbose_level_debug, "Found '$column_name' column in $table_name."); $query = "UPDATE $table_name SET $column_name = ?". " WHERE $column_name = ?"; $sth_update = $dbh->prepare($query); $sth_update->bind_param(1, $new_hostname); $sth_update->bind_param(2, $old_hostname); $result = $sth_update->execute; if (!defined($result)) { verbose($verbose_level_always, "Unable to update $column_name in table: ". $table_name, $sth_update->errstr); $exit++; } else { verbose($verbose_level_debug, 'Updated '. (($result == 0E0) ? '0' : $result) ." rows in table: $table_name"); } last; } } } if ($num_tables == 0) { verbose($verbose_level_always, 'Database is empty. Cannot change hostname.'); return 1; } # delete (orphaned) rows with hostname coded into chainid in tvchain # live-<hostname>-2008-06-26T18:43:18 $table_name = 'tvchain'; $query = "DELETE FROM $table_name WHERE chainid LIKE ?"; $sth_update = $dbh->prepare($query); $sth_update->bind_param(1, '%'.$old_hostname.'%'); $result = $sth_update->execute; if (!defined($result)) { verbose($verbose_level_debug, "Unable to remove orphaned $table_name rows.", $sth_update->errstr); } else { verbose($verbose_level_debug, 'Removed '. (($result == 0E0) ? '0' : $result) ." orphaned entries in table: $table_name"); } # hostname coded into SGweightPerDir setting in settings (modify) # SGweightPerDir:<hostname>:<directory> $table_name = 'settings'; $query = "UPDATE $table_name SET value = REPLACE(value, ?, ?)". " WHERE value LIKE ?"; $sth_update = $dbh->prepare($query); $sth_update->bind_param(1, 'SGweightPerDir:'.$old_hostname.':'); $sth_update->bind_param(2, 'SGweightPerDir:'.$new_hostname.':'); $sth_update->bind_param(3, 'SGweightPerDir:'.$old_hostname.':%'); $result = $sth_update->execute; if (!defined($result)) { verbose($verbose_level_always, 'Unable to update SGweightPerDir setting for host.', $sth_update->errstr); } else { verbose($verbose_level_debug, 'Updated '. (($result == 0E0) ? '0' : $result) .' SGweightPerDir settings.'); } } return $exit; } sub get_db_schema_ver { connect_to_database(1, 1) if (!defined($dbh)); if (!defined($dbh)) { verbose($verbose_level_error, '', 'ERROR: Unable to connect to database.'); return -1; } my $query = 'SELECT data FROM settings WHERE value = ?'; if (defined($dbh)) { my $sth = $dbh->prepare($query); if ($sth->execute('DBSchemaVer')) { while (my @data = $sth->fetchrow_array) { $mysql_conf{'db_schemaver'} = $data[0]; verbose($verbose_level_debug, '', 'Found DBSchemaVer:'. " $mysql_conf{'db_schemaver'}."); } } else { verbose($verbose_level_debug, "Unable to retrieve DBSchemaVer from". " database."); } } return 0; } sub set_database_charset { return 0 if (!$create_database && !$drop_database); if (get_db_schema_ver && ! $mysql_conf{'db_schemaver'}) { verbose($verbose_level_error, "Unknown database schema version. Assuming current."); $mysql_conf{'db_schemaver'} = '1216'; } if ($mysql_conf{'db_schemaver'} > 1215) { connect_to_database(0, 1) if (!defined($dbh)); if (!defined($dbh)) { verbose($verbose_level_error, '', 'ERROR: Unable to connect to database.'); return -1; } verbose($verbose_level_debug, 'Setting database character set.'); my ($query, $sth); $query = qq{ALTER DATABASE $mysql_conf{'db_name'} DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;}; $sth = $dbh->prepare($query); if (! $sth->execute()) { verbose($verbose_level_error, '', 'ERROR: Unable to set database character set.', $sth->errstr); return -16; } } return 0; } sub restore_backup { my $exit = 0; my $defaults_extra_file = create_defaults_extra_file; my $host_arg = ''; my $port_arg = ''; my $user_arg = ''; my $filter = ''; if ($defaults_extra_file) { $defaults_arg = " --defaults-extra-file='$defaults_extra_file'"; } else { $defaults_arg = ''; } my $safe_mysql_client = $mysql_client; $safe_mysql_client =~ s/'/'\\''/g; # Create the args for host, port, and user, shell-escaping values, as # necessary. my $safe_string; if ($mysql_conf{'db_host'}) { $safe_string = $mysql_conf{'db_host'}; $safe_string =~ s/'/'\\''/g; $host_arg = " --host='$safe_string'"; } if ($mysql_conf{'db_port'} > 0) { $safe_string = $mysql_conf{'db_port'}; $safe_string =~ s/'/'\\''/g; $port_arg = " --port='$safe_string'"; } if ($mysql_conf{'db_user'}) { $safe_string = $mysql_conf{'db_user'}; $safe_string =~ s/'/'\\''/g; $user_arg = " --user='$safe_string'"; } # Configure a filter for a partial/new-host restore if ($partial_restore) { my @partial_restore_tables; if (defined($with_plugin_data)) {
  10. Lua é utilizada em programação de games com java junto ou outra linguagem de programação Lua é utilizada para programar partes dos aplicativos para tv digital Na programação para tv digital é utilizado as linguagens ncl, java, lua, xml e html Para procurar para programação para tv digital é so procura por middleware ginga ou simplesmente sistema ginga Que acaba aparecendo algo junto sobre lua
  11. Executei esse comandos mas continua o problema ainda aqui O Systemback não abre a GUI dele, só funciona via terminal e o Skype não abre de jeito nenhum Apesar de estar ate com icone no menu para acessar e utilizar Por log não da pra saber o que aconteceu? Mas não sei onde localiza o log de programas inseridos e removidos do Debian Jessie
  12. Com desktop distinto cada um usando Um usando o desktop normalmente E o outro acessando via rede interna ou externa No Windows ou Smartphone Android o outro Desktop Por exemplo se for no Android, vai precisar instalar algum programa nele pra acessar o Debian? Se por exemplo: Tiver o no meu Debian, o usuarios X e Y X esta usando o Debian novamente E Y resolver acessar tambem mas não o desktop de X e sim de Y remotamente via Android O que deve ser feito para Y acessar sem atrapalhar o uso de X Tentei com o Teamviewer mas quando acessa via Android remotamente, ele interfere no usuario que esta usando o Debian localmente
  13. Como faço para reinserir alguns pacotes do DVD do Debian Jessie no Debian Jessie do meu HD? Eu acho que estão faltando pacotes no Debian do meu HD Porque eu utilizei o apt-get autoremove e outros comandos e revolveram alguns pacotes E os programas como Skype, Systemback e alguns outros So funciona via terminal ou não funciona apesar de instalado
  14. Imagem anexada do aparelho com suas conexões disponíveis, com o qual pretendo utilizar junto com o computador e placa de captura
  15. As opções: Placa de Captura EasyCAP 4 Canais - Vídeo e Áudio Estéreo PCA.514 http://www.kabum.com.br/produto/63748/placa-de-captura-easycap-4-canais-video-e-audio-estereo-pca-51... Mais barata MyGica Dispositivo de Captura e Edição de Vídeo Analógico Externo USB EZ Grabber 2 9589 http://www.kabum.com.br/produto/49568/mygica-dispositivo-de-captura-e-edicao-de-video-analogico-exte... Preço intermediario AverMedia Kit de Vídeo Captura M - C039M http://www.kabum.com.br/produto/27904/avermedia-kit-de-video-captura-m-c039m Mais cara To pensando agora em ficar com a MyGica Dispositivo de Captura e Edição de Vídeo Analógico Externo USB EZ Grabber 2 9589 porque alem de preço intermediario, deve ser melhor que EasyCAP

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...