This file contains hidden or 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
//ocultar teclado | |
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); |
This file contains hidden or 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
Collections.sort(list, (o1, o2) -> { | |
return (o1.getFecha() > o2.getFecha() ? -1: (o1.getFecha() < o2.getFecha() ? -1 : 0)); | |
}); |
This file contains hidden or 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
/** | |
* Parsing barcode | |
* | |
* @param barcode codigo de barra en crudo | |
* @return codigo de barra pulido | |
*/ | |
String parseBarcode(String barcode) { | |
Log.w(TAG, "parseBarcode: " + barcode ); | |
int index1 = barcode.indexOf(0x02); |
This file contains hidden or 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
public void iniciarlizarTabla() { | |
listaProcesadores.add(new IssuerTable("IC", "TRANSACCION DE INFONET COBRANZAS", "DEBITO")); | |
listaProcesadores.add(new IssuerTable("ID", "TARJETA DEBITO INFONET", "DEBITO")); | |
listaProcesadores.add(new IssuerTable("MD", "TARJETA DEBITO MAESTRO", "DEBITO")); | |
listaProcesadores.add(new IssuerTable("VD", "TARJETA DEBITO ELECTRON", "DEBITO")); | |
listaProcesadores.add(new IssuerTable("TD", "TARJETA DEBITO GENERICA", "DEBITO")); | |
listaProcesadores.add(new IssuerTable("MC", "TARJETA DEBITO MASTERCARD", "BANCARD")); | |
listaProcesadores.add(new IssuerTable("VC", "TARJETA CREDITO VISA", "BANCARD")); | |
listaProcesadores.add(new IssuerTable("BC", "TARJETA CREDITO BANCARD", "BANCARD")); | |
listaProcesadores.add(new IssuerTable("AC", "TARJETA CREDITO AMERICAN", "BANCARD")); |
This file contains hidden or 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
/** | |
* Parsing barcode | |
* | |
* @param barcode codigo de barra en crudo | |
* @return codigo de barra pulido | |
*/ | |
String parseBarcode(String barcode) { | |
if (barcodeMode == Utiles.BARCODE_MODE_1D) { | |
//modo 1D |
This file contains hidden or 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
# Archivo de configuracion de entornos | |
import os | |
class Config(object): | |
DEBUG = False | |
TESTING = False | |
SECRET_KEY = os.urandom(9990999) | |
ALLOWED_EXTENSIONS = {'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif', 'fbk'} | |
JINJA_ENV_CACHE = None | |
TRIM_BLOCKS = True |
This file contains hidden or 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
>>> datetime.strptime(cr_date, '%Y-%m-%d %H:%M:%S.%f') | |
datetime.datetime(2013, 10, 31, 18, 23, 29, 227) | |
>>> datetime.strptime(cr_date, '%Y-%m-%d %H:%M:%S.%f').strftime('%m/%d/%Y') | |
'10/31/2013' |
This file contains hidden or 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
public static void activarBluetooth(boolean value) { | |
BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); | |
if (value) { | |
if (!bluetoothAdapter.isEnabled()) { | |
bluetoothAdapter.enable(); | |
} | |
}else{ | |
if (bluetoothAdapter.isEnabled()){ | |
bluetoothAdapter.disable(); | |
} |
This file contains hidden or 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
@app.context_processor | |
def inject_functions(): | |
return dict(date=datetime.date.today().strftime("%d/%m/%Y")) |
This file contains hidden or 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
DECLARE | |
al_id Alert := Find_Alert('ALERT15'); | |
al_button NUMBER; | |
WTOTAL NUMBER; | |
FileHandle1 WIN_API.FILE_TYPE; | |
FileName1 VARCHAR2(400) := 'C:\xxxx.DAT'; | |
FileMode1 VARCHAR2(30) := 'W'; | |
RaiseExceptions1 BOOLEAN := FALSE; | |
Wokudum1 boolean; | |
DataBuffer1 VARCHAR2(400); |