Which kind of appliances can one connect to electric sockets located in a airplane’s toilet?

Which kind of appliances can one connect to electric sockets located in a plane’s toilet?

I have read/heard conflicting information:

http://asiaspirit.com/lavatory.html (mirror):

The electric socket in the toilet is for shaver only, do no try to power up your notebook computer.

-> Why shaver only? What happens if one tries to power up one’s notebook computer?

Quote from a United Airlines flight attendant:

Don’t use electric sockets located in a plane’s toilet otherwise it’ll create a short circuit.

how to access a file that is located on a different hard drive from within a python script

And another related question: how to access a file via network from within a python script; the Network is a samba share.

I tried different things, but can’t figure it out. I keep getting: No such file or directory

I am running the script like this: (Note that I am using my name in place of $ Username)

$   /usr/bin/python3 "/home/$  Username/Documents/my first python script.py" 

This is my mount:

/media/$  Username/ssd/ 

This is my file:

/media/$  Username/ssd/test/SD/1.avi 

I have been trying different things, but nothing works.

How do I call the functions that manage my connections with SQLite3 located in a separate class from a viewController?

The problem is simple, I have a code that works in the viewController but when you get it to a class to avoid redundancy since it is a lot of code and always the same it stops working or rather works but does not recognize the statements (“SQL logic erro” ), I know the meaning but I do not understand because if in a viewController it works in passing it to a class to call it from either side it stops working or does not recognize the sentences.

This is the class that does not work for me, if you put it in a viewController it works but if you take it to an external class it does not …:

//  ConexionDB.swift //  TFG // //  Created by Daniel Queraltó Parra on 22/03/2019. //  Copyright © 2019 Daniel Queraltó Parra. All rights reserved. //  import Foundation import SQLite3  internal class ConexionDB {      private var db: OpaquePointer?     private var usuarios = [Usuario]()     private var dbName: String = "Datos.sqlite"      private var sentAddTabUsu: String = "CREATE TABLE IF NOT EXISTS Usuarios (usuario TEXT PRIMARY KEY, contrasenia TEXT, tipo TEXT, nombre TEXT, apellidos TEXT, fec_nac TEXT, email TEXT,sexo TEXT);COMMIT;"     private var sentDelUsu: String = "DELETE FROM Usuarios WHERE usuario ='"     private var sentDelAllUsu: String = "DELETE FROM Usuarios;COMMIT;"     private var sentInsertUsu: String = "INSERT INTO Usuarios(usuario, contrasenia, tipo, nombre, apellidos, fec_nac, email, sexo) VALUES ('"     internal func conectarDB()      {         //INDICAMOS DONDE SE GUARDARA LA BASE DE DATOS Y EL NOMBRE DE ESTAS         let fileURL = try! FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: false)             .appendingPathComponent(dbName)         //INDICAMOS SI DIERA ALGUN FALLO AL CONECTARSE         if sqlite3_open(fileURL.path, &db) != SQLITE_OK {             print("error al abrir la base de datos")         }         else {//SI PODEMOS CONECTARNOS A LA BASE DE DATOS CREAREMOS LA ESTRUCTURA DE ESTA, SI NO EXISTIERA NO SE HARIA NADA             print("base abierta")             //if sqlite3_exec(db, "CREATE TABLE IF NOT EXISTS Usuarios (usuario TEXT PRIMARY KEY, contrasenia TEXT, tipo TEXT, nombre TEXT)", nil, nil, nil) != SQLITE_OK {             if sqlite3_exec(db, sentAddTabUsu, nil, nil, nil) != SQLITE_OK {                 //if sqlite3_exec(db, "CREATE TABLE IF NOT EXISTS Usuarios (usuario TEXT PRIMARY KEY, contrasenia TEXT, tipo TEXT, nombre TEXT, apellidos TEXT, fec_nac TEXT, email TEXT,sexo TEXT); CREATE TABLE IF NOT EXISTS Movimientos (num_reg TEXT PRIMARY KEY, FOREIGN KEY(usuario) REFERENCES Usuarios(usuario), fecha TEXT, importe REAL, tipo BOOLEAN);", nil, nil, nil) != SQLITE_OK {                 let errmsg = String(cString: sqlite3_errmsg(db)!)                 print("error creating table: \(errmsg)")             }         }         print("BD creada")         self.crearObjUsuario()         print("Usuarios creados")         if usuarios.count == 0         {             self.insertarUsuario(usu: "admin", pass: "admin", tipo: "A",nom: "Administrador",apell: "Administrador",fec_nac: "16/10/1996",email: "admin@admin.admin",sexo: "poco")             print("ADMIN insertado.")         }      }      internal func conectarDB(nombreDB: String)     {         //INDICAMOS DONDE SE GUARDARA LA BASE DE DATOS Y EL NOMBRE DE ESTAS         let fileURL = try! FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: false)             .appendingPathComponent(nombreDB)         //INDICAMOS SI DIERA ALGUN FALLO AL CONECTARSE         if sqlite3_open(fileURL.path, &db) != SQLITE_OK {             print("error al abrir la base de datos")         }         else {//SI PODEMOS CONECTARNOS A LA BASE DE DATOS CREAREMOS LA ESTRUCTURA DE ESTA, SI NO EXISTIERA NO SE HARIA NADA             print("base abierta")             //if sqlite3_exec(db, "CREATE TABLE IF NOT EXISTS Usuarios (usuario TEXT PRIMARY KEY, contrasenia TEXT, tipo TEXT, nombre TEXT)", nil, nil, nil) != SQLITE_OK {             if sqlite3_exec(db, sentAddTabUsu, nil, nil, nil) != SQLITE_OK {                 //if sqlite3_exec(db, "CREATE TABLE IF NOT EXISTS Usuarios (usuario TEXT PRIMARY KEY, contrasenia TEXT, tipo TEXT, nombre TEXT, apellidos TEXT, fec_nac TEXT, email TEXT,sexo TEXT); CREATE TABLE IF NOT EXISTS Movimientos (num_reg TEXT PRIMARY KEY, FOREIGN KEY(usuario) REFERENCES Usuarios(usuario), fecha TEXT, importe REAL, tipo BOOLEAN);", nil, nil, nil) != SQLITE_OK {                 let errmsg = String(cString: sqlite3_errmsg(db)!)                 print("error creating table: \(errmsg)")             }         }         print("BD creada")         self.crearObjUsuario()         print("Usuarios creados")         if usuarios.count == 0         {             self.insertarUsuario(usu: "admin", pass: "admin", tipo: "A",nom: "Administrador",apell: "Administrador",fec_nac: "16/10/1996",email: "admin@admin.admin",sexo: "poco")             print("ADMIN insertado.")         }      }        internal func crearObjUsuario(){           //GUARDAMOS NUESTRA CONSULTA         let queryString = "SELECT * FROM Usuarios;"          //PUNTERO DE INSTRUCCIÓN         var stmt:OpaquePointer?          //PREPARACIÓN DE LA CONSULTA         if sqlite3_prepare(db, queryString, -1, &stmt, nil) != SQLITE_OK{             let errmsg = String(cString: sqlite3_errmsg(db)!)             print("error preparing insert: \(errmsg)")             return         }          //RECORREMOS LOS REGISTROS         while(sqlite3_step(stmt) == SQLITE_ROW){             print("illo")             let usuario = String(cString: sqlite3_column_text(stmt, 0))             let contrasenia = String(cString: sqlite3_column_text(stmt, 1))             let tipo = String(cString: sqlite3_column_text(stmt, 2))             let nombre = String(cString: sqlite3_column_text(stmt, 3))             let apellidos = String(cString: sqlite3_column_text(stmt, 4))             let fec_nac = String(cString: sqlite3_column_text(stmt, 5))             let email = String(cString: sqlite3_column_text(stmt, 6))             let sexo = String(cString: sqlite3_column_text(stmt, 7))             print("illo2")             //AÑADIMOS LOS VALORES A LA LISTA             self.usuarios.append(Usuario(                 usuario: String(describing: usuario),                 contrasenia: String(describing: contrasenia),                 tipo:String(describing: tipo)                 ,nombre:String(describing: nombre)                 ,apellidos:String(describing: apellidos)                 ,fec_nac:String(describing: fec_nac)                 ,email:String(describing: email)                 ,sexo:String(describing: sexo)              ))         }         print("siiiiiiiiii")     }      internal func insertarUsuario(usu:String,pass:String, tipo: String, nom: String,apell: String, fec_nac: String,email: String, sexo: String)  {         //CREAMOS EL PUNTERO DE INSTRUCCIÓN         var stmt: OpaquePointer?          //CREAMOS NUESTRA SENTENCIA         let queryString = sentInsertUsu+usu+"','"+pass+"','"+tipo+"','"+nom+"','"+apell+"','"+fec_nac+"','"+email+"','"+sexo+"');commit;"         //PREPARAMOS LA SENTENCIA         if sqlite3_prepare(db, queryString, -1, &stmt, nil) != SQLITE_OK{             let errmsg = String(cString: sqlite3_errmsg(db)!)             print(queryString)             print("error preparing insert: \(errmsg)")             return         }           //EJECUTAMOS LA SENTENCIA PARA INSERTAR LOS VALORES         if sqlite3_step(stmt) != SQLITE_DONE {             let errmsg = String(cString: sqlite3_errmsg(db)!)             print("fallo al insertar en usuarios: \(errmsg)")             //nurvc.alerta2.isHidden = true             //nurvc.alerta3.isHidden = true             //nurvc.alerta.isHidden = false             return         }          //FINALIZAMOS LA SENTENCIA         sqlite3_finalize(stmt)         print("Insertado")         //displaying a success message         print("Usuario saved successfully")      }      internal func eliminarUsuarios()     {         //GUARDAMOS NUESTRA CONSULTA         let queryString = sentDelAllUsu         //CREAMOS EL PUNTERO DE INSTRUCCIÓN         var deleteStatement: OpaquePointer? = nil          //PREPARACIÓN DE LA CONSULTA         if sqlite3_prepare(db, queryString, -1, &deleteStatement, nil) != SQLITE_OK{             let errmsg = String(cString: sqlite3_errmsg(db)!)             print(queryString)             print("error preparing insert: \(errmsg)")             return         }         //ELIMINAMOS LOS REGISTROS         if sqlite3_prepare_v2(db, queryString, -1, &deleteStatement, nil) == SQLITE_OK {             if sqlite3_step(deleteStatement) == SQLITE_DONE {                 print("Successfully deleted row.")             } else {                 print("Could not delete row.")             }         } else {             print("DELETE statement could not be prepared")         }          //FINALIZAMOS LA SENTENCIA         sqlite3_finalize(deleteStatement)         //insertarAdmin()     }      internal func eliminarUsuario(usu: String)     {         //GUARDAMOS NUESTRA CONSULTA         let queryString = sentDelUsu+usu+"';COMMIT;"         //CREAMOS EL PUNTERO DE INSTRUCCIÓN         var deleteStatement: OpaquePointer? = nil          //PREPARACIÓN DE LA CONSULTA         if sqlite3_prepare(db, queryString, -1, &deleteStatement, nil) != SQLITE_OK{             let errmsg = String(cString: sqlite3_errmsg(db)!)             print(queryString)             print("error preparing insert: \(errmsg)")             return         }         //ELIMINAMOS LOS REGISTROS         if sqlite3_prepare_v2(db, queryString, -1, &deleteStatement, nil) == SQLITE_OK {             if sqlite3_step(deleteStatement) == SQLITE_DONE {                 print("Successfully deleted row.")             } else {                 print("Could not delete row.")             }         } else {             print("DELETE statement could not be prepared")         }          //FINALIZAMOS LA SENTENCIA         sqlite3_finalize(deleteStatement)         //insertarAdmin()     }  } 

How does VirtualBox handle NAT networks i.e., where are NAT tables located? [on hold]

I am trying to understand NAT networks. I understood that it helps in translating Private addresses to public addresses for server to client communication (usecase specific to VirtualBox NAT type network). But, where to see these NAT tables?

I am using my windows host. Is it in memory space of a windows process and can we see it with any command?

Minimum set of constraints required to located a point within a timeline

I have a very specific problem, applicable to my own use-case of what I am trying to do and I was wondering if anyone can help me come up with, or point me directions towards how can I go about solving it. Or whether there is a simple mathematical model I can apply to solve the problem.

Given a fixed timeline, or time represented on a numberline extending far into the future upto a particular value, and extending into the past with a particular value, I need to be able to find the minimum set of constraints that are able to locate a particular point (within a particular accuracy) that lies at an unknown point on the timeline.

This is the solution that I currently have:

enter image description here

As shown in the diagram above, I initially add two constraints: C1: x = X – 5 and y = Y where Y is some time in the future uptil where I am trying to find my point, lets assume its 25 in this case. This is a known numeric initial value. Similarly, the second constraint is y = X+5 and and x = 25 or any value in the past. Based on where the point is located, it will reject the first constraint, or the second, or both, or accept both. In all equations, 5 is the minimum accuracy to which I want to locate the point. This helps us make the following table:

enter image description here

In step 2, if I want to explore Case 2, I move further to the left, and define another set of constraints similar to the previous one.

This allows me to come up with a general equation for the number of constraints required (given that I add two at each step):

enter image description here

5 + 5*2 (n - 1)

where n = number of iterations.

So, if I wanted an accuracy uptil 25 to the left, I would need exactly n = 3 iterations and therefore a total of 6 constraints.

The question I have is that, even though I am adding two constraints at each step (coz that seems to be the minimum number I can add to be able to locate the point), is there any other way to arrive at the minimum number of constraints, or whether there is a mathematical model that would help me solve it for the minimum number of constraints required given that I want to locate a point within an accuracy of 5. I’ve thought of Linear Programming, but linear programming doesn’t really help me with coming up with the minimum set of constraints.

.indexes & .tesnet3 not located on my Bitcoin dir

started fresh a new lightning node using the raspiblitz guide but while synching the client from my desktop pc (MAC) i wasnt able to locate these files ( “.indexes .testnet3” ) required by the guide to properly synch the client on the pi. It’s weird those files arent anywhere in ~/library/Application Support/Bitcoin/

I’m running the latest bitcoin core version .17.1 and one of the most requirements of the guide when copying the blockchain from the latest version is ( txindex=1 in the bitcoin.conf) but i didnt modify the .conf at all since it should be by default with the latest version…

Any ideas where to locate those files in Mac?

Are medical prescriptions written by physicians located outside the United States recognized in the United States?

Are medical prescriptions written by physicians located outside the United States recognized in the United States?

Example of medical prescriptions: medical imaging (e.g., MRI or x-ray), physiotherapy sessions, pharmaceutical drugs.

The recognition (or the lack of) may happen at different levels, such as the federal laws, the state laws, physicians, or the health insurances.

Where is this dust located on my sensor?

I have a really nasty looking piece of dust on my 550D’s sensor, situated in the top right-hand corner of each image I take with anything higher than f/11. I am going to get a decent sensor cleaning kit, but I’d like to know which corner of the sensor should I focus on to get rid of this annoying particle?

In other words, does a lens flip the incoming light from left to right and turn it upside down? I think that’s correct, so that means the answer in this diagram will be A, correct?

enter image description here

And before anyone asks – yes, I will clean the entire sensor while I’m in there, but this will help me focus on this particular (pun intended) problem. Thanks in advance!