tengo un telefono al cual ya lo formatee de fabrica pero cuando vuelvo a iniciar para configurarlo me pide la cuenta de google o un pin. como se quita eso. O como lo busco en internet; si es que se puede hacer.
gracias
gracias
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
import scrapy
class WitsiSpider(scrapy.Spider):
name = 'witsi'
allowed_domains = ['www.quotes.toscrape.com']
start_urls = ['http://quotes.toscrape.com']
def parse(self, response):
citas = response.xpath('//*[@class="quote"]')
for cita in citas:
texto = cita.xpath('.//*[@class="text"]/text()').extract_first()
autor = cita.xpath('.//*[@class="author"]/text()').extract_first()
palabras_claves = cita.xpath('.//*[@itemprop="keywords"]/@content').extract_first()
yield{ 'Texto' : texto,
'Autor' : autor,
'Palabras Claves' : palabras_claves }
url_a_continuar = response.xpath('//ul[@class="pager"]/li[@class="next"]/a/@href').extract()
url_siguiente = response.urljoin(url_a_continuar)
yield scrapy.Request(url_siguiente, callback = self.parse)
import scrapy
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
class WitsiSpider(CrawlSpider):
name = 'witsi'
allowed_domains = ['quotes.toscrape.com']
start_urls = ['http://quotes.toscrape.com']
rules = (
Rule(LinkExtractor(allow=r'page/'),callback = 'parse', follow=True ),
)
def parse(self, response):
citas = response.xpath('//*[@class="quote"]')
for cita in citas:
texto = cita.xpath('.//*[@class="text"]/text()').extract_first()
autor = cita.xpath('.//*[@class="author"]/text()').extract_first()
palabras_claves = cita.xpath('.//*[@itemprop="keywords"]/@content').extract_first()
yield{ 'Texto' : texto,
'Autor' : autor,
'Palabras Claves' : palabras_claves }
yield
{"Texto": "\u201cA woman is like a tea bag; you never know how strong it is until it's in hot water.\u201d", "Autor": "Eleanor Roosevelt", "Palabras Claves": "misattributed-eleanor-roosevelt"},
{"Texto": "\u201cA day without sunshine is like, you know, night.\u201d", "Autor": "Steve Martin", "Palabras Claves": "humor,obvious,simile"},
{"Texto": "\u201cLife is what happens to us while we are making other plans.\u201d", "Autor": "Allen Saunders", "Palabras Claves": "fate,life,misattributed-john-lennon,planning,plans"},
{"Texto": "\u201cLife is what happens to us while we are making other plans.\u201d", "Autor": "Allen Saunders", "Palabras Claves": "fate,life,misattributed-john-lennon,planning,plans"},
{"Texto": "\u201cLife is what happens to us while we are making other plans.\u201d", "Autor": "Allen Saunders", "Palabras Claves": "fate,life,misattributed-john-lennon,planning,plans"},
{"Texto": "\u201c... a mind needs books as a sword needs a whetstone, if it is to keep its edge.\u201d", "Autor": "George R.R. Martin", "Palabras Claves": "books,mind"},
{"Texto": "\u201cYou have to write the book that wants to be written. And if the book will be too difficult for grown-ups, then you write it for children.\u201d", "Autor": "Madeleine L'Engle", "Palabras Claves": "books,children,difficult,grown-ups,write,writers,writing"},
{"Texto": "\u201cYou have to write the book that wants to be written. And if the book will be too difficult for grown-ups, then you write it for children.\u201d", "Autor": "Madeleine L'Engle", "Palabras Claves": "books,children,difficult,grown-ups,write,writers,writing"},
{"Texto": "\u201cYou have to write the book that wants to be written. And if the book will be too difficult for grown-ups, then you write it for children.\u201d", "Autor": "Madeleine L'Engle", "Palabras Claves": "books,children,difficult,grown-ups,write,writers,writing"},
{"Texto": "\u201cYou have to write the book that wants to be written. And i
catch (SQLException ex)
{
}
catch( NullPointerException e)
{
}
catch (IOException e) {
}
public void crearConexionSQL() throws ClassNotFoundException
{
try
{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
conexion = DriverManager.getConnection("jdbc:sqlserver://" + servidor + ":" + puerto + ";databaseName=" + nombre_base_datos + ";user=" + usuario + ";password=" + clave + "");
conexion.setAutoCommit(false);//Se desactiva el auto commit
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog( null, "EN CONEXION crearConexionSQL SQLException \n\n" + ex.getMessage(), "ERROR DE SISTEMA 40", JOptionPane.ERROR_MESSAGE );
}
}
public void crearConexionMySQL() throws ClassNotFoundException
{
try
{
Class.forName("com.mysql.jdbc.Driver");
conexion = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/referencia_contrareferencia", "root" , "" );
conexion.setAutoCommit(false);//Se desactiva el auto commit
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog( null, "EN CONEXION crearConexionMySQL SQLException \n\n" + ex.getMessage(), "ERROR DE SISTEMA 56", JOptionPane.ERROR_MESSAGE );
}
catch (ClassNotFoundException e)
{
JOptionPane.showMessageDialog( null, "EN CONEXION crearConexionMySQL ClassNotFoundException \n\n" + e.getMessage(), "ERROR DE SISTEMA 60", JOptionPane.ERROR_MESSAGE );
}
}
public void aceptarSentencias()
{
try
{
conexion.commit();
consultaExitosa( true );
}
catch (SQLException e)
{
desHacerSentencia();
JOptionPane.showMessageDialog(null, "EN CONEXION aceptarSetencias SQLException \n\n" + e.getMessage(), "ERRORDE SISTEMA 128", JOptionPane.ERROR_MESSAGE );
}
}
public void desHacerSentencia()
{
try
{
conexion.rollback();
consultaExitosa( false );
System.out.println("dadadasd");
}
catch (SQLException e)
{
JOptionPane.showMessageDialog(null, "EN CONEXION desHacerSentencia SQLException \n\n" + e.getMessage(), "ERRORDE SISTEMA 140", JOptionPane.ERROR_MESSAGE );
}
}
public Vector<Object[]> obtenerSomatometria() throws SQLException
{
Vector<Object[]> datos= new Vector<Object[]>();
datos.clear();
ResultSet valores;
try
{
conexion.crearConexionSQL();
//conexion.getConexion().setAutoCommit(false);
conexion.setSetenciaPreparada(
conexion.getConexion().prepareStatement(
"SELECT IDPaciente, IDDiccionario, cCve_Respuesta, cValor " +
"FROM somatometria" ) );
valores = conexion.ejecutarConsultaObtener();
while( valores.next() )
{
datos.addElement(
new Object[]
{
valores.getString( 1 ),valores.getString( 2 ),valores.getString( 3 ),
valores.getString( 4 )
}
);
}
//conexion.getSetenciaPreparada().close();
//conexion.cerrarConexion();
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog( null, "ERROR DE EJECUCI\u00D3N DEL QUERY CONSULTAS obtenerPaciente SQLException \n\n" + ex.getMessage(), "ERROR DE SISTEMA 454", JOptionPane.ERROR_MESSAGE );
System.exit( 0 );
}
catch (ClassNotFoundException e)
{
JOptionPane.showMessageDialog( null, "EN CONSULTAS obtenerPaciente ClassNotFoundException \n\n" + e.getMessage() , "ERROR DE SISTEMA 459", JOptionPane.ERROR_MESSAGE );
System.exit( 0 );
}
catch( NullPointerException e)
{
JOptionPane.showMessageDialog( null, "EN CONSULTAS obtenerPaciente NullPointerException \n\n" + e.toString() , "ERROR DE SISTEMA 464", JOptionPane.ERROR_MESSAGE );
System.exit( 0 );
}
return datos;
}
public void exportarMySQL( Vector<Object[]> datos, int opcion ) throws SQLException
{
try
{
int indice = 1;
conexion.crearConexionMySQL();
for (Object[] objects : datos)
{
if( opcion == 1 )
{
conexion.setSetenciaPreparada(
conexion.getConexion().prepareStatement(
"INSERT INTO referencias ( IDReferencia,IDPaciente,IDUMedicaEnvia,IDUMedicaRef,cDescripcionRef,cServicio,cDiagnostico,cMotivoReferencia,cResumenClinico,cTratamiento,cFecha,IDMedico,cStatus,IdMotivo,cCompleta,dFecha_Cancelacion,IdPersonal_Cancela,cMotivo_Cancelacion,cUrgente,cNombreMedico,dFechaPrimeraAtencion,cStatusEnviado ) VALUES( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )"
)
);
}
else if( opcion == 2 )
{
conexion.setSetenciaPreparada(
conexion.getConexion().prepareStatement(
"INSERT INTO ContraReferencias (IDUMedica, IDContraReferencia, IDServicio, IDAreaMedica, cResumenClinico, cRecomendaciones, IDPersonal_Elabora, IDUnidadReferencia, IDReferencia, cObservaciones, dFecha_Reg, cStatus, dFecha_Cancelacion, IDPersonal_Cancela, cMotivo_Cancelacion, cNombreMedico, cStatusEnviado) VALUES( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )"
)
);
}
else
{
conexion.setSetenciaPreparada(
conexion.getConexion().prepareStatement(
"INSERT INTO Det_ContraReferencia_Diag ( IDUMedica,IDContraReferencia,IDDiagnostico,cDescripcion,cmotivocontrareferencia,IDReferencia ) VALUES( ?, ?, ?, ?, ?, ? )"
)
);
}
for( Object valores : objects )
{
conexion.getSetenciaPreparada().setObject( indice, valores );
++indice;
}
conexion.ejecutarConsultaModificar();
indice = 1;
}
//conexion.getSetenciaPreparada().close();
//conexion.cerrarConexion();
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog( null, "ERROR DE EJECUCI\u00D3N DEL QUERY CONSULTAS exportarMySQL SQLException \n\n" + ex.getMessage(), "ERROR DE SISTEMA 131", JOptionPane.ERROR_MESSAGE );
System.exit( 0 );
}
catch (ClassNotFoundException e)
{
JOptionPane.showMessageDialog( null, " EN CONSULTAS exportarMySQL ClassNotFoundException \n\n" + e.getMessage(), "ERROR DE SISTEMA 136", JOptionPane.ERROR_MESSAGE );
System.exit( 0 );
}
catch( NullPointerException e)
{
JOptionPane.showMessageDialog( null, " EN CONSULTAS exportarMySQL NullPointerException \n\n" + e.toString(), "ERROR DE SISTEMA 141", JOptionPane.ERROR_MESSAGE );
System.exit( 0 );
}
}
mySystemTray.MensajeTrayIcon( "COMENZANDO CON LA B\u00DASQUEDA DE CONTRAREFERENCIA" , MessageType.INFO );
consulta.exportarMySQL( consulta.ObtenerContrareferencia(), 2 );
consulta.getConexion().aceptarSentencias();
f(consulta.getConexion().getConsultaExitosa() )
{
System.out.println("siii"); //Si entra aqui por lo tanto no hubo ningun error pero aun a si no se guarda nada
propiedad.salvarConfiguracion();
}
package cargarNuevosMedicamentosSigho;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Properties;
import javax.swing.JOptionPane;
public class propertie extends Properties{
private InputStream propertiesStream;
public propertie() {
try
{
//File f = new File("/tt/configuracionConexion.properties");
//FileOutputStream out = new FileOutputStream( "configuracion/configuracionConexion.properties" );
//propertiesStream = new FileReader(("configuracion/configuracionConexion.properties"));
//propertiesStream = ClassLoader.getSystemResourceAsStream(( "configuracion/configuracionConexion.properties" ) );
load( new FileReader( "configuracion/configuracionConexion.properties" ));
//load( propertiesStream );
/*ClassLoader myCL = propertie.class.getClassLoader();
load(
myCL.getResourceAsStream(
"srcs/configuracionConexion.properties"));*/
}
catch (FileNotFoundException e)
{
JOptionPane.showMessageDialog( null, "EL ARCHIVO CONFIGURACI\u00D3N CONEXI\u00D3N NO SE ENCUENTRA \n" + e.getMessage(), "ERROR", JOptionPane.ERROR_MESSAGE );
System.exit( 1 );
}
catch (IOException e)
{
JOptionPane.showMessageDialog( null, "EL ARCHIVO CONFIGURACI\u00D3N CONEXI\u00D3N PUEDE ESTAR CORRUPTO \n" + e.getMessage(), "ERROR", JOptionPane.ERROR_MESSAGE );
System.exit( 1 );
}
}
public void cerrarProperties()
{
try
{
propertiesStream.close();
}
catch (IOException e)
{
JOptionPane.showMessageDialog( null, "FALLO AL CERRAR EL ARCHIVO CONFIGURACI\u00D3N CONEXI\u00D3N \n" + e.getMessage(), "ERROR", JOptionPane.ERROR_MESSAGE );
System.exit( 1 );
}
}
public String[] getValoresProperties()
{
String[] valores = new String[ 5 ];
valores[ 0 ] = getProperty("servidor.nombre");
valores[ 1 ] = getProperty("servidor.puerto");
valores[ 2 ] = getProperty("servidor.base_datos");
valores[ 3 ] = getProperty("servidor.usuario");
valores[ 4 ] = getProperty("servidor.password");
return valores;
}
public void setValoresProperties( String... valores)
{
setProperty("servidor.nombre", valores[ 0 ] );
setProperty("servidor.puerto", valores[ 1 ] );
setProperty("servidor.base_datos", valores[ 2 ] );
setProperty("servidor.usuario", valores[ 3 ] );
setProperty("servidor.password", valores[ 4 ] );
}
public void salvarValores()
{
try
{
//File f = new File(getClass().getResource("configuracionConexion.properties").toURI());
OutputStream out = new FileOutputStream( "configuracion/configuracionConexion.properties" );
//store(new FileOutputStream( f ) ,"un comentario");
store( out,"un comentario" );
}
catch (IOException e)
{
JOptionPane.showMessageDialog( null, "FALLO AL ESCRIBIR EL ARCHIVO CONFIGURACI\u00D3N CONEXI\u00D3N \n" + e.getMessage(), "ERROR", JOptionPane.ERROR_MESSAGE );
System.exit( 1 );
}
}
}