android – Tomar foto en servicio con onPreviewFrame

It was intended to take a picture with the camera on the front of the screen and perform a display service on the preview frame to protect the format of the .jpg file and store the photos that I distort and not have written off.

It starts with the camera's API, not the configuration and configuration of the camera.

The Codigo del Servicio and the Tengo ahora mismo es el siguiente:

public class ServicioTextureCamara extends service {
private final static string TAG = "CameraServiceTexture";
private camera mCamera;
private bitmap _currentFrame;
public static final String FACEDETECTIONTHREAD_TAG = "FaceDetectionThread_Tag";


@Override public int onStartCommand (Intent intent, int flags, int startId) {
new PictureThread (). begin ();
return START_STICKY;
}

private class PictureThread extends Thread {
Surface Texture texture;
Private byte[] callback buffer;
public void run () {
mCamera = CameraHelper.getCameraInstance ();

texture = new SurfaceTexture (0);
texture.setDefaultBufferSize (4, 4);

To attempt {
mCamera.setPreviewTexture (texture);
} catch (IOException e1) {
e1.printStackTrace ();
}

Camera.Size previewSize = mCamera.getParameters (). GetPreviewSize ();
int dataBufferSize = (int) (previewSize.height * previewSize.width *
(ImageFormat.getBitsPerPixel (mCamera.getParameters (). GetPreviewFormat ()) / 8.0));
callbackBuffer = new byte[dataBufferSize];

mCamera.addCallbackBuffer (callbackBuffer);
mCamera.setPreviewCallbackWithBuffer (previewCallback);

mCamera.startPreview ();


time = System.currentTimeMillis ();
}

private int mMaxCount = 100;
private int mCount = 0;
private long time;

private final Camera.PreviewCallback previewCallback = new Camera.PreviewCallback () {
@Override public void onPreviewFrame (Byte[] Data, camera camera) {
long currentTime = System.currentTimeMillis ();
Log.i (TAG, "onPreviewFrame" + data.length + "" + (currentTime - time));
time = currentTime;
mCamera.addCallbackBuffer (callbackBuffer);

File pictureFileDir = getDir (Environment.DIRECTORY_PICTURES, Context.MODE_PRIVATE);
if (! pictureFileDir.exists () &&! pictureFileDir.mkdirs ()) {
Return;
}
SimpleDateFormat dateFormat = new SimpleDateFormat ("yyyymmddhhmmss");
String date = dateFormat.format (new Date ());
String photoFile = "PictureFront_" + "_" + date + ".jpg";
String filename = pictureFileDir.getPath () + File.separator + photoFile;
File mainPicture = new file (filename);

To attempt {
FileOutputStream fos = new FileOutputStream (mainPicture);
fos.write (data);
fos.close ();
System.out.println ("image saved");
} catch (exception error) {
System.out.println ("Image could not be saved");
}
}
};

}

}

Alguien tiene alguna idea of ​​que puede estar times?

Many Thanks.

json – No ad jTable con java Swing!

Ask if you've created a spreadsheet or spreadsheet with information about a particular topic or process at the time the sale is pending.

private void jbInit () raises Exception {
this.setSize (new dimension (500, 400));
jProgreso.setOrientation (JProgressBar.HORIZONTAL);
jProgreso.setBackground (Color.lightGray);
jProgreso.setVisible (false);
jProgreso.setEnabled (true);
jProgreso.setDoubleBuffered (false);
jProgreso.setMaximumSize (new dimension (100, 25));
jProgreso.setMinimumSize (new dimension (100, 25));
jProgreso.setOpaque (false);
jProgreso.setPreferredSize (new dimension (100, 25));
jProgreso.setString ("0%");
jProgreso.setStringPainted (true);
jProgreso.setBounds (new rectangle (55, 318, 397, 33));
jLabelFileName.setFont (new java.awt.Font ("Dialog", 0, 14));

jTAExplicacion.setBounds (new rectangle (30, 30, 408, 82));
jTAExplicacion.setBorder (BorderFactory.createLoweredBevelBorder ());
jTAExplicacion.setMaximumSize (new dimension (300, 100));
jTAExplicacion.setMinimumSize (new dimension (300, 100));
jTAExplicacion.setOpaque (false);
jTAExplicacion.setPreferredSize (new dimension (300, 100));
jTAExplicacion.setRequestFocusEnabled (false);
jTAExplicacion.setEditable (false);
jTAExplicacion.setLineWrap (true);
jTAExplicacion.setWrapStyleWord (true);
jTAExplicacion.setText (EXPLICACION_PREVIA_A_IMP);
jTAExplicacion.setRows (5);
jTAExplicacion.setFocusable (false);
jTAExplicacion.setCursor (Cursor.getPredefinedCursor (Cursor.HAND_CURSOR));

jTAMensajes.setBounds (new rectangle (10, 235, 450, 68));
jTAMensajes.setBorder (BorderFactory.createLoweredBevelBorder ());
jTAMensajes.setMaximumSize (new dimension (300, 100));
jTAMensajes.setMinimumSize (new dimension (300, 100));
jTAMensajes.setOpaque (false);
jTAMensajes.setPreferredSize (new dimension (300, 100));
jTAMensajes.setRequestFocusEnabled (false);
jTAMensajes.setVisible (false);
jTAMensajes.setEditable (false);
jTAMensajes.setLineWrap (true);
jTAMensajes.setWrapStyleWord (true);
jTAMensajes.setText ("Preparando la importacion");
jTAMensajes.setRows (3);
jTAMensajes.setCursor (Cursor.getPredefinedCursor (Cursor.HAND_CURSOR));

jLabelFileName.setBounds (new rectangle (31, 134, 200, 20));
jLabelFileName.setMaximumSize (new dimension (80, 20));
jLabelFileName.setMinimumSize (new dimension (80, 20));
jLabelFileName.setPreferredSize (new dimension (80, 20));
jLabelFileName.setToolTipText ("Indique el nombre del archivo a importar");
jLabelFileName.setText ("Archivo a importar:");
jTextFieldFilename.setBounds (new rectangle (32, 160, 325, 20));
jTextFieldFilename.setMaximumSize (new dimension (200, 20));
jTextFieldFilename.setMinimumSize (new dimension (200, 20));
jTextFieldFilename.setPreferredSize (new dimension (200, 20));
jTextFieldFilename.setText ("Nombre del Archivo a importar");
jButtonContinuar.setBounds (new rectangle (119, 198, 100, 20));
jButtonContinuar.setMaximumSize (new dimension (73, 25));
jButtonContinuar.setMinimumSize (new dimension (81, 25));
jButtonContinuar.setToolTipText (
"Presione para continuar con la importacion de archivos");
jButtonContinuar.setActionCommand ("jButtonContinuarAction");
jButtonContinuar.setMnemonic (& # 39; C & # 39;);
jButtonContinuar.setText ("Continuar");
jButtonCancelar.setMnemonic (& # 39; X & # 39;);
jButtonCancelar.setText ("Cancelar");
jButtonCancelar.setBounds (new rectangle (265, 198, 100, 25));
jButtonCancelar.setMaximumSize (new dimension (73, 25));
jButtonCancelar.setMinimumSize (new dimension (81, 25));
jButtonCancelar.setToolTipText (
"Presione para salir de esta pantalla");

jButtonAbortar.setMnemonic (& # 39; X & # 39;);
jButtonAbortar.setText ("Cancelar");
jButtonAbortar.setBounds (new rectangle (200, 200, 100, 25));
jButtonAbortar.setMaximumSize (new dimension (73, 25));
jButtonAbortar.setMinimumSize (new dimension (81, 25));
jButtonAbortar.setToolTipText (
"Presione para cancelar la importacion de archivos");
jButtonAbortar.setCursor (Cursor.getPredefinedCursor (Cursor.DEFAULT_CURSOR));

jButtonFileChooser.setMnemonic (& # 39; s & # 39;);
jButtonFileChooser.setText ("Seleccionar");
jButtonFileChooser.setBounds (new rectangle (368, 160, 100, 25));
jButtonFileChooser.setMaximumSize (new dimension (73, 25));
jButtonFileChooser.setMinimumSize (new dimension (81, 25));
jButtonFileChooser.setToolTipText ("Presione para seleccionar el archivo");

jButtonFileChooser.addActionListener (new FileChooserActionListener ());
jButtonCancelar.addActionListener (new CancelListener ());
jButtonAbortar.addActionListener (new CancelListener ());
jButtonContinuar.addActionListener (new ProcesaImportacionListener ());
this.getContentPane (). setLayout (null);
this.getContentPane (). add (jTAExplicacion);
this.getContentPane (). add (jProgreso, null);
this.getContentPane (). add (jTAMensajes, null);
this.getContentPane (). add (jLabelFileName, null);
this.getContentPane (). add (jTextFieldFilename, null);
this.getContentPane (). add (jButtonFileChooser, null);
this.getContentPane (). add (jButtonCancelar, null);
this.getContentPane (). add (jButtonAbortar, null);
this.getContentPane (). add (jButtonContinuar, null);

jProgreso.setVisible (false);
jButtonAbortar.setVisible (false);

add (miBarra);
miBarra.setBounds (27, 72, 379, 130);



}

private void construirTabla () {
setTitle ("Json Importados");
String data [][]= {};
String col[]= "TIPO EVENTO SIC", "TIPO DERECHO COVACK",
"ES_REGIMEN_FISCAL", "ORIGEN_DERECHO",
"NOT AS"};
modelo = new DefaultTableModel (data, col); // Ejemplo video


//miTabla1.setModel(model);

// miTabla1 = new JTable (informacion, titulos);


miBarra.setViewportView (miTabla1);
add (miBarra);
miBarra.setBounds (27, 72, 379, 130);
}


private void agregarValores (JSONObject json) {
int cont = 0;
// if (modelo == null) {
//miTabla1.setModel(modelo);
System.out.println ("ttttttttttttttttttt");
//}


DefaultTableModel modelo = (DefaultTableModel) miTabla1.getModel (); // Aqui marca error

Vector line = new vector ();

//modelo.insertRow(0, new object[]{});
System.out.println ("uuuuuuuuuuuu ..." + modelo);
// Inserción de valores obtenidos del Json
JSONObject retencion = (JSONObject) json.get ("retencion");
JSONObject imetoNeto = (JSONObject) json.get ("importeNeto");
row.add (json.get ("transaccion"));
row.add (json.get ("fechaPago"));
row.add (json.get ("creditoDebito"));
row.add (retencion.get ("percent"));
row.add (importeNeto.get ("amount"));


/*modelo.setValueAt(json.get("transaccion "), cont, 0);
modelo.setValueAt (json.get ("fechaPago"), cont, 1);

modelo.setValueAt (json.get ("creditoDebito"), cont, 2);
modelo.setValueAt (retencion.get ("percent"), cont, 3);
modelo.setValueAt (importsNeto.get ("amount"), cont, 4); * /

//modelo.setValueAt("0 ", cont, 0);
cont ++;
// Hasta aca
miTabla1.setModel (modelo);
}


private void agregarValores (JSONObject json) {
int cont = 0;
// if (modelo == null) {
//miTabla1.setModel(modelo);
System.out.println ("ttttttttttttttttttt");
//}


DefaultTableModel modelo = (DefaultTableModel) miTabla1.getModel (); // Aqui marca error

Vector line = new vector ();

//modelo.insertRow(0, new object[]{});
System.out.println ("uuuuuuuuuuuu ..." + modelo);
// Inserción de valores obtenidos del Json
JSONObject retencion = (JSONObject) json.get ("retencion");
JSONObject imetoNeto = (JSONObject) json.get ("importeNeto");
row.add (json.get ("transaccion"));
row.add (json.get ("fechaPago"));
row.add (json.get ("creditoDebito"));
row.add (retencion.get ("percent"));
row.add (importeNeto.get ("amount"));


/*modelo.setValueAt(json.get("transaccion "), cont, 0);
modelo.setValueAt (json.get ("fechaPago"), cont, 1);

modelo.setValueAt (json.get ("creditoDebito"), cont, 2);
modelo.setValueAt (retencion.get ("percent"), cont, 3);
modelo.setValueAt (importsNeto.get ("amount"), cont, 4); * /

//modelo.setValueAt("0 ", cont, 0);
cont ++;
// Hasta aca
miTabla1.setModel (modelo);
}


private void obtenerMatriz () {// JJ Metodo con el que estoy trabajando

JSONParser parser = new JSONParser ();
To attempt{
Object obj = parser.parse (new FileReader ("D: /Usuarios/JBustamante/Desktop/C0_2019-05-31_927837_0.json");

System.out.println ("Cadena completa json del archivo ..." + obj);

JSONObject jsonObjectArchivo = (JSONObject) obj; // Se guarda in the variable jsonObject la cadena json del archivo
Object objJson = jsonObjectArchivo.get ("opciones");
if (objJson instanceof JSONArray) {
System.out.println ("An array of options is created");
JSONArray obj2 = (JSONArray) objJson;
System.out.println ("objsss ...." + obj2);
// Recorremos en array, ya que sabemos su tamaño

for (int i = 0; i <obj2.size (); i ++) {// Recorrido de transacciones
JSONObject elementoItem = (JSONObject) obj2.get (i);
JSONArray transacciones = (JSONArray) (elementoItem.get ("transacciones"));
for (int j = 0; j <transacciones.size (); j ++) {
JSONObject transaccionesItem = (JSONObject) transacciones.get (j);
agregarValores (transaccionesItem);
}



}

}

} catch (exception e) {
e.printStackTrace ();
}


}

You can abort the process to get information you need to get a soy to start using the swing library and pedirles queries. Back to the top, the code is not a markup error and espero y puedan ayudarme por. Espero y puedan ayudarme por. Espero y puedan ayudarme por. Espero y puedan ayudarme por. Espero y puedan ayudarme por. Espero y puedan ayudarme por favor se los agradecería bastante, quedo al pendiente de sus comentarios saludos.

i 2019: hv

i 2019: hv[IMG]https: //i106.fastpic****big/2019/0606/e4/949a6c1e5547a41ead27fcdd5f05a3e4.jpg[/IMG] I: I: I: : 6: 50, 26. 2019. 78 84. 6 .. 2 (2017) HD 720p. 4 ::::. 71-79. 8th.. . . , ,,:, 2010., ..:. : 18-20 19: 30.8 :, () (,,: 2HD 77. .onlinevideooblog —-. & # 39; 2019: (Dark 70- (,, 2. 2019 25 34., 51.9% ( 95),, 3. 2018., .. – 78. # & # 39; ".1 7. 2019 hd yr w. 2019 .: 2. miracle .. .25. 2018, – , (R (94) 13 -., 2018. 82, 87, 105, 107, 116, 116, -, Transitions Online.6, 2019, 3, 3, 3, 3, 2, 2019. 2.MP3: 128 kbps .:: 11 .2. 6 2019, :: ,, 89 (- -) .14. 201913: 30, 04:30, 23:20, 85. 16:50: "HD9,289 Posts. – ":" ,,. Summer childrensday – 2 days ago 57 Likes -: Online.ua .2019 17:37 #: 10, – "." – "",: () "-" , ".19: 51" :, 2008.,.,. 66 ", .22. 2014, 68 – .22. 201718: 50. 18:30 -. 16.5 HD.:. (7) Miracles: 20th century Fox Youtube:.:.:.: Marvel: 23:43. 23:17 2019. 2019 HD.: 5. – – DUPLO 1080p 2019, & # 39; 20th Century Fox Youtube: 20th Century Fox X-Men: Dark Phoenix: ().,. (). ,,:. 1963.. , 9-, 6th "": FacebookInstagram.X-Men: Dark Phoenix: 6 2019! ::::,.,. ,,: ,,,,,, – ,, DARK PHOENIX 6 2019 ,. . : 28: dark phoenix. 6 2019! . . ":". ":". , , 100.. , , :. :. , , 2019-3-6 12:31. :. . 2018-10-01 16:30. , 2019: ":". , "". & # 39; 14 2019.. News and media website. Comic Con Ukraine. : (2019). Dark Phoenix. Red Lotus. 22. Kota Eberhardt. Luna. :. , :. : ,,,,,,,,. : 120.:. (). 06. 14:10 3D. , 65 – 70 70 – 75. 07. 14:10 3D. , 65 – 70. 18:10. , 70 – 75 …. , , , , , :. , :. : ,,,,,,,,. :. , 06. 12:30. , 50 – 60 50 – 60. 16:40. , 60 – 70. 19:10. , 75 – 85. 152012., 150, 142017: DARK PHOENIX 6 2019! , 20 – ,,, 10:10 3D 55 12:00 3D 75 13:40 75 15:30 75 17:20 85 18:50 3D 85. 3 ,. 10:10 3D 55 12:00 3D 60 13:40 60 15:30 60 17:20 60 18:50 3D 75. 4 ,. 10:10 3D 55 12:00 3D 60 13:40 60 15:30 60 17:20 60 18:50 3D 75. 5 ,. 10:10 3D 55 12:00 3D 60 13:40 60 15:30 60 17:20 60 18:50 3D 75. Aladdin. , 1,. . , () :. :. , 3. 2019-, 2019- ,. , 1980 ,. : – ,,,. ,, -. -. "". -. , – ::. – -. , – Wonder, DC. :: 2019: i 2019: i 2019 ::: 2019 :: i 2019 hd :: 2019 i hd: 2019: http: //ozguryazilim.gen.tr/showthrea…php? Tid = 263913.

MervinROX
Reviewed by MervinROX on
,
i 2019: hv
i 2019: hvhttps: //i106.fastpic*****big/2019/0606/e4/949a6c1e5547a41ead27fcdd5f05a3e4.jpg i: i: i :: 6: 50, 26. 2019. 78 84. 6 .. 2 (2017 ) HD 720p. 4 ::::. 71-79. 8th.. . . , ,,:, 2010., ..:. : 18-20 19: 30.8 :, () (,,: 2HD 77. .onlinevideooblog —-. & # 39; 2019: (Dark 70- (,, 2. 2019 25 34., 51.9% ( 95) & # 39; 3, 2018.
Rating: 5

,

hd d3

BlackHatKings: General PPC discussion
Posted by: MervinROX
Post Time: May 28, 2019 at 4:38 pm.

DNS no resuelve con 127.0.0.53 pero resuelve localmente con 127.0.0.1 configureado con Bind9 en Ubuntu 18.04.2

A DNS has been configured with Bind9, the configuration has been done and the archive has been validated without error with the named_checkzone command and the sale is fine.

Entonces hago una prueba con host y con dig para ver que resuelva correctamente.

En el archivo /etc/resolv.conf tengo configureado Nameserver 127.0.0.53

$ Host traveler.mx
Host traveler.mx not found: 2 (SERVFAIL)

$ dig traveler.mx
; << >> DiG 9.11.3-1ubuntu1.7-Ubuntu << >> traveler.mx
;; global options: + cmd
;; To get an answer:
;; - >> HEADER << - Opcode: QUERY, Status: SERVFAIL, ID: 55789
;; Flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: Version: 0, Flags:; udp: 65494
;; QUESTION SECTION:
traveller.mx. IN ONE

;; Polling time: 1319 ms
;; SERVER: 127.0.0.53 # 53 (127.0.0.53)
;; WHEN: Wednesday, May 15, 21:17:19 BST 2019
;; MSG SIZE rcvd: 42

seduces me to the dice Host traveler.mx not found: 2 (SERVFAIL) They are unable to perform satisfactorily.

Entonces cambio el nameserver en el archivo /etc/resolv.conf dejandolo con Nameserver 127.0.0.1

$ Host traveler.mx
traveler.mx has the address 217.112.81.185

$ dig traveler.mx
; << >> DiG 9.11.3-1ubuntu1.7-Ubuntu << >> traveler.mx
;; global options: + cmd
;; To get an answer:
;; - >> HEADER << - Opcode: QUERY, Status: NOERROR, ID: 14900
;; Flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2

;; OPT PSEUDOSECTION:
; EDNS: Version: 0, Flags:; udp: 4096
; COOKIE: e561c3a3b15a5eecabe2fbf85cdc71d2e4514a534dcffaf7 (good)
;; QUESTION SECTION:
traveller.mx. IN ONE

;; ANSWER SECTION:
traveler.mx. 604800 IN A 217.112.81.185

;; AUTHORITY SECTION:
traveler.mx. 604800 IN NS ns1.traveler.mx.

;; ADDITIONAL SECTION:
ns1.traveler.mx. 604800 IN A 217.112.81.185

;; Polling time: 0 ms
;; SERVER: 127.0.0.1 # 53 (127.0.0.1)
;; WHEN: Wednesday, 15 May, 21.08.50 (MEZ 2019)
;; MSG SIZE rcvd: 120

parece que localmente si trabajara.

mis archivos de configuration son:

/etc/bind/named.conf.local

//
// Do a local configuration here
//

// Consider adding the 1918 zones here if they are not used in yours
// Organization
// include "/etc/bind/zones.rfc1918";

zone "traveler.mx" ​​{
Type master;
File "/etc/bind/zones/db.traveler";
Permission transfer {217.112.81.185; };
};

zone "81.112.217.in-addr.arpa" {
Type master;
File "/etc/bind/zones/db.185";
Permission transfer {217.112.81.185; };
};

/etc/bind/named.conf.option an archivo solo le agrego

Freight Forwarders {
217,112,81,185;
};

** / etc / bind / areas / db.traveler

;
; BIND data file for local loopback interface
;
$ TTL 604800
@ IN SOA ns1.traveler.mx. root.traveler.mx. (
2018121904; Serial
604800; Update
86400; To repeat
2419200; expire
604800); Negative cache TTL
; Naneservers
traveler.mx. IN NS ns1.traveler.mx.

; A Records to Nameserver
ns1 IN A 217.112.81.185

; Other records
@ IN A 217.112.81.185
www IN A 217.112.81.185

/etc/bind/zones/db.185

;
; BIND reverse data file for local loopback interface
;
$ TTL 604800
@ IN SOA localhost. root.localhost. (
2018121901; Serial
604800; Update
86400; To repeat
2419200; expire
604800); Negative cache TTL
;
@ IN NS ns1.
10 IN PTR ns1.traveler.mx.

Alguien sabra que pueda estar pasando?

Tutorials and tutorials have been written to create a free link /run/systemd/resolv/resolv.conf pero no me funciono, tambien revise si el puerto 53 se foundraba abierto

$ netstat -nlutp
Active Internet connections (server only)
Proto Recv-Q Send-Q Local Address Foreign Address Status PID / Program Name
tcp 0 0 217.112.81.185:53 0.0.0.0:* LISTEN 28021 / named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 28021 / named
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 25057 / systemd-resol
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 956 / sshd
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 28021 / named
tcp6 0 0 ::: 53 ::: * LISTEN 28021 / named
tcp6 0 0 ::: 22 ::: * LISTEN 956 / sshd
tcp6 0 0 :: 1: 953 ::: * LISTEN 28021 / named
udp 0 0 217.112.81.185:53 0.0.0.0:* 28021 / named
udp 0 0 127.0.0.1:53 0.0.0.0:21 28021 / named
udp 0 0 127.0.0.53:53 0.0.0.0:* 25057 / systemd-resol
udp6 0 0 ::: 53 ::: * 28021 / named

postgresql – Problema con Psotgresql y Pacemaker

Tengo 2 nodos de posgresql 10 en centos 7, uno como master and otro como esclavo, replicado of recovery.conf

El contenido del recovry.conf it:

standby_mode = & # 39; on & # 39;
primary_conninfo = host = 10.240.49.81 port = 5432 user = postgres application_name = idepgsql02n.ieca.junta-andalucia.es keepalives_idle = 60 keepalives_interval = 5 keepalives_count = 5 & # 39;
restore_command = # cp / var / lib / pgsql / pg_archive /% f% p & # 39;
recovery_target_timeline = & # 39; latest & # 39;

Y está funcionando correctamente.

Desde el master si hago

su – postgres
psql -c "Select client_addr, sync_state from pg_stat_replication."

I devuelve corerctamente

client_addr | sync_state
————– + ————
10.240.49.82 | asynchronous
(1st row)

Ahora intento pasar este "cluster" a pacemaker

To configure:

pcs cluster cib pgsql_cfg

pcs -f pgsql_cfg property set no-quorum-policy = "ignore"
pcs -f pgsql_cfg property set stonith-enabled = "false"
pcs -f pgsql_cfg resource default migration-threshold = "1"

pcs -f pgsql_cfg create resource vip-master IPaddr2
ip = "10.240.49.83"
nic = "ens160"
cidr_netmask = "24"
op start timeout = "60s" interval = "0s" on-fail = "restart"
op monitor timeout = "60s" interval = "10s" on-fail = "restart"
op stop timeout = "60s" interval = "0s" on-fail = "block"

pcs -f pgsql_cfg resource create pgsql pgsql
pgctl = "/ usr / pgsql-10 / bin / pg_ctl"
psql = "/ usr / pgsql-10 / bin / psql"
pgdata = "/ var / lib / pgsql / 10 / data /"
rep_mode = "sync"
node_list = "idepgsql01n idepgsql2n"
restore_command = "cp / var / lib / pgsql / pg_archive /% f% p"
primary_conninfo_opt = "keepalives_idle = 60 keepalives_interval = 5 keepalives_count = 5"
master_ip = "10.240.49.83"
restart_on_promote = & # 39; true & # 39;
op start timeout = "60s" interval = "0s" on-fail = "restart"
op monitor timeout = "60s" interval = "4s" on-fail = "restart"
op monitor timeout = "60s" interval = "3s" on-fail = "restart" role = "Master"
op promot timeout = "60s" interval = "0s" on-fail = "restart"
op demote timeout = "60s" interval = "0s" on-fail = "stop"
op stop timeout = "60s" interval = "0s" on-fail = "block"
op notify timeout = "60s" interval = "0s"

pcs -f pgsql_cfg Resource Master msPostgresql pgsql
Master max = 1 master node max = 1 clone max = 2 clone node max = 1 notification = true

pcs -f pgsql_cfg Restriction order start vip-master and then move msPostgresql symmetric = false score = INFINITY

PC cluster cib-push pgsql_cfg –config

Pero no consigo ue levant los nodos de postgresql, me aparece lo siguiente si ejecuto crm_mon -Afr -1:


Stack: Corosync
Current DC: idepgsql02n (Version 1.1.19-8.el7_6.4-c3c624ea3d) – Partition with quorum
Last update: Thu 9th May 14:32:32 2019
Last change: Thu 9th May 14:32:05 2019 from root via cibadmin on idepgsql01n

2 nodes configured
3 resources configured

On-line: [ idepgsql01n idepgsql02n ]

Complete list of resources:

vip-master (ocf :: heartbeat: IPaddr2): idepgsql01n started
Master / Slave Set: msPostgresql [pgsql]
stopped: [ idepgsql01n idepgsql02n ]

Node attributes:
* Node idepgsql01n:
+ master-pgsql: -INFINITY
* Node idepgsql02n:
+ master-pgsql: -INFINITY

Migration summary:
* Node idepgsql01n:
pgsql: migration-threshold = 1 error count = 1000000 last-failure = & DoW 9th May 14:32:17 2019 & # 39;
* Node idepgsql02n:
pgsql: migration-threshold = 1 error count = 1000000 last-failure = & DoW 9th May 14:32:17 2019 & # 39;

Failed actions:
* pgsql_start_0 at idepgsql01n # unknown error & # 39; (1): call = 12, status = complete, exitreason = & # 39 ;,
last-rc-change = & # 39; Do May 9 14:32:07 2019 & # 39 ;, queued = 1 ms, exec = 10596 ms
* pgsql_start_0 at idepgsql02n # unknown error & # 39; (1): call = 11, status = complete, exitreason = & # 39 ;,
last-rc-change = & # 39; Do May 9 14:32:07 2019 & # 39 ;, queued = 0 ms, exec = 10613 ms


En el log de los nodos de / var / log / messages me aparece lo siguiente en ambos


May 9 14:33:29 idepgsql01n pgsql (pgsql)[23839]: INFO: Do not check / var / lib / pgsql / 10 / data / during the check
May 9 14:33:29 idepgsql01n pgsql (pgsql)[23839]: INFO: PostgreSQL is not available
May 9 14:33:29 idepgsql01n crmd[22677]: notice: Result of the test operation for pgsql under idepgsql01n: 7 (does not run)
May 9 14:33:29 idepgsql01n rsyslogd: Action & action 7 & # 39; Continued (module & # 39; builtin: omfwd & # 39;) [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
May 9 14:33:29 idepgsql01n rsyslogd: Action & action 7 & # 39; Continued (module & # 39; builtin: omfwd & # 39;) [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
May 9 14:33:29 idepgsql01n su: (to postgres) root to none
May 9 14:33:29 idepgsql01n pgsql (pgsql)[23886]: WARNING: Repeat (stay 5). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-master-baseline -D" failed. rc = 6. stdout = "".
May 9 14:33:31 idepgsql01n pgsql (pgsql)[23886]: WARNING: Repeat (stay 4). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-master-baseline -D" failed. rc = 6. stdout = "".
May 9 14:33:32 idepgsql01n pgsql (pgsql)[23886]: WARNING: Repeat (stay 3). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-master-baseline -D" failed. rc = 6. stdout = "".
May 9 14:33:33 idepgsql01n pgsql (pgsql)[23886]: WARNING: Repeat (stay 2). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-master-baseline -D" failed. rc = 6. stdout = "".
May 9 14:33:34 idepgsql01n pgsql (pgsql)[23886]: WARNING: Repeat (remains 1). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-master-baseline -D" failed. rc = 6. stdout = "".
May 9 14:33:35 idepgsql01n pgsql (pgsql)[23886]: ERROR: Execution of "/ usr / sbin / crm_attribute -l reboot -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-master-baseline -D" is aborted
May 9 14:33:35 idepgsql01n su: (to postgres) root to none
May 9 14:33:35 idepgsql01n pgsql (pgsql)[23886]: WARNING: Repeat (stay 5). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-xlog-loc -D" failed. rc = 6. stdout = "".
May 9 14:33:36 idepgsql01n pgsql (pgsql)[23886]: WARNING: Repeat (stay 4). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-xlog-loc -D" failed. rc = 6. stdout = "".
May 9 14:33:37 idepgsql01n pgsql (pgsql)[23886]: WARNING: Repeat (stay 3). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-xlog-loc -D" failed. rc = 6. stdout = "".
May 9 14:33:38 idepgsql01n pgsql (pgsql)[23886]: WARNING: Repeat (stay 2). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-xlog-loc -D" failed. rc = 6. stdout = "".
May 9 14:33:39 idepgsql01n pgsql (pgsql)[23886]: WARNING: Repeat (remains 1). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-xlog-loc -D" failed. rc = 6. stdout = "".
May 9 14:33:40 idepgsql01n pgsql (pgsql)[23886]: ERROR: Execution of "/ usr / sbin / crm_attribute -l reboot -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-xlog-loc -D" is aborted
May 9th 14:33:40 idepgsql01n lrmd[22674]: notice: pgsql_start_0: 23886: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9th 14:33:40 idepgsql01n lrmd[22674]: notice: pgsql_start_0: 23886: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9th 14:33:40 idepgsql01n lrmd[22674]: notice: pgsql_start_0: 23886: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9th 14:33:40 idepgsql01n lrmd[22674]: notice: pgsql_start_0: 23886: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9th 14:33:40 idepgsql01n lrmd[22674]: notice: pgsql_start_0: 23886: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9th 14:33:40 idepgsql01n lrmd[22674]: notice: pgsql_start_0: 23886: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9th 14:33:40 idepgsql01n lrmd[22674]: notice: pgsql_start_0: 23886: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9th 14:33:40 idepgsql01n lrmd[22674]: notice: pgsql_start_0: 23886: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9th 14:33:40 idepgsql01n lrmd[22674]: notice: pgsql_start_0: 23886: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9th 14:33:40 idepgsql01n lrmd[22674]: notice: pgsql_start_0: 23886: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9 14:33:40 idepgsql01n crmd[22677]: notice: result of the start process for pgsql under idepgsql01n: 1 (unknown error)
May 9 14:33:40 idepgsql01n crmd[22677]: notice: idepgsql01n-pgsql_start_0: 23[Name = idepgsql01n.ieca.junta-andalucia.es could not be assigned to a UUID nName = idepgsql01n.ieca.junta-andalucia.es could not be assigned to a UUID nName = idepgsql01n.ieca.junta-andalucia. it could not be mapped to a UUID name = idepgsql01n.ieca.junta-andalucia.es could not be mapped to a UUID name = idepgsql01n.ieca.junta-andalucia.es could not be mapped to a UUID name = idepgsql01n.ieca. Assigning junta-andalucia.es to a UUID could not map name = idepgsql01n.ieca.junta-andalucia.es to a UUID
May 9 14:33:40 idepgsql01n su: (to postgres) root to none
May 9 14:33:40 idepgsql01n crmd[22677]: notice: Result of the notification operation for pgsql under idepgsql01n: 0 (ok)
May 9 14:33:40 idepgsql01n su: (to postgres) root to none
May 9 14:33:40 idepgsql01n crmd[22677]: notice: Result of the notification operation for pgsql under idepgsql01n: 0 (ok)
May 9 14:33:40 idepgsql01n su: (to postgres) root to none
May 9 14:33:40 idepgsql01n pgsql (pgsql)[24192]: WARNING: Repeat (stay 5). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-xlog-loc -D" failed. rc = 6. stdout = "".
May 9 14:33:41 idepgsql01n pgsql (pgsql)[24192]: WARNING: Repeat (stay 4). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-xlog-loc -D" failed. rc = 6. stdout = "".
May 9 14:33:42 idepgsql01n pgsql (pgsql)[24192]: WARNING: Repeat (stay 3). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-xlog-loc -D" failed. rc = 6. stdout = "".
May 9 14:33:43 idepgsql01n pgsql (pgsql)[24192]: WARNING: Repeat (stay 2). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-xlog-loc -D" failed. rc = 6. stdout = "".
May 9 14:33:44 idepgsql01n pgsql (pgsql)[24192]: WARNING: Repeat (remains 1). "/ usr / sbin / crm_attribute -l restart -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-xlog-loc -D" failed. rc = 6. stdout = "".
May 9 14:33:45 idepgsql01n pgsql (pgsql)[24192]: ERROR: Execution of "/ usr / sbin / crm_attribute -l reboot -N idepgsql01n.ieca.junta-andalucia.es -n pgsql-xlog-loc -D" is aborted
May 9 14:33:45 idepgsql01n pgsql (pgsql)[24192]: INFO: PostgreSQL is already stopped.
May 9 14:33:46 idepgsql01n lrmd[22674]: notice: pgsql_stop_0: 24192: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9 14:33:46 idepgsql01n lrmd[22674]: notice: pgsql_stop_0: 24192: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9 14:33:46 idepgsql01n lrmd[22674]: notice: pgsql_stop_0: 24192: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9 14:33:46 idepgsql01n lrmd[22674]: notice: pgsql_stop_0: 24192: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9 14:33:46 idepgsql01n lrmd[22674]: notice: pgsql_stop_0: 24192: stderr [ Could not map name=idepgsql01n.ieca.junta-andalucia.es to a UUID ]
May 9 14:33:46 idepgsql01n crmd[22677]: notice: result of the stop process for pgsql under idepgsql01n: 0 (ok)


Alguien sabe lo que puede estar sucediendo?
Además, al fallar, me intenta crear el archivo /var/lib/pgsql/10/data/recovery.conf de el nodo1

Un saludo y muchs gracias de antemano.

nodejs – Autentificación con passport js modificada (local strategy)

module.exports = function (pass, user) {

var usuario = user;
var LocalStrategy = required (& # 39; passport-local & # 39;). Strategy;

// serialize
passport.serializeUser (function (user, done) {
done (null, user.cedula);
});

// deserialize user
passport.deserializeUser (function (Cedula, done) {
Usuario.findOne ({{{
include: [modelRol.Rol],
where: {cedula: cedula}
}). then (function (user) {
if (user) {
done (null, user.get ());
} else {
done (user.errors, null);
}
});
});

// LOCAL SIGNIN
passport.use (& # 39; local-signin & # 39 ;, new LocalStrategy (

{
/ *
De forma predeterminada, Austrian companies that opt ​​for use in a specific area,
los anularemos con el correo electrónico
* /
UsernameField: & # 39; Cedula & # 39 ;,
PasswordField: & # 39; Password & # 39 ;,
passReqToCallback: true // No Permite passwords for the solicitudo completion of the Devolución de Lamada
},

Function (req, cedula, password, done)
var usuario = user;
var isValidPassword = function (userpass, password) {
return bCrypt.compareSync (password, user pass);
}

Usuario.findOne ({{{
include: [modelRol.Rol],
where: {cedula: cedula}
}). then (function (user) {

if (! user) {
return done (null, wrong, {
Message: & # 39; e-mail does not exist & # 39;
});
}


if (! isValidPassword (user.password, password)) {
return done (null, wrong, {
Message: & # 39; Wrong password. & # 39;
});
}

var empleadoinfo = user.get ();
return done (null, empleadoinfo);

}). catch (function (err) {
console.log ("Error:", err);

return done (null, wrong, {
Message: "An error has occurred with your signin"
});
});
}
));
}

AL empaquetar proyecto con electron-builder me dice error, require no esta definido

un saludo a todos. Estoy utilizando electron de nodejs, todo funcionaba perfecto en mis anteriores aplicaciones, pero ahora cada vez que ejecuto el empaquetamiento, me sale ese error. Mientras pruebo mi aplicacion con npm start, todo funciona bien. Quizas sea porque las dependencias no se estan agregando. pero como comprobarlo. Pueden ayudarme por favor?

! 2019 ar

! 2019 ar[IMG]https: //i109.fastpic*****big/2019/0414/2c/158b2d02d4bab05b3713d5448a1462c.jpg[/IMG] ! ! !! , ! ,,,,, 2019. 26 – 15, 09:00. ! DC Comics .19: DC. , , , .2019. 76th 2018 HD, 1: 29-03-2019, 09:33 – 3 747! (2019). 2019 Deadpool HD 720 1080 ,. 0 8 2016 20: 38,170. 2019! 27 16+! , 6. Online Jul 21, 2018 – 3 minutes ,. 4 2019 .. DC Marvel! Boris Way feat. Carla Katz – Want Katz – Want You: 58767; 320 kbps, 6.36 Mb, 02:42; : mp3; :. , , , 7, -. 2 Aug 2017 – 3 min – Uploaded at 8 pm? Ve2ctESe6qgk25 2019 – 2019 2019 2019 2019! (2019): TS: 1.37. ::. shazam.torrent 14.06 Kb (c: 37). , -. , :: 4992. .illyminat.- 21:04.! (2019). Shazam! IMDb: 7.80. -. , , ! , ,, -. , "". , -.,. – – – "". 93.349. -. , , 20. 14. 2019 10:19. : 11. 8802-04-10T15: 54: 51. Huip (06-04-2019, 05:46). +1. !!! 0436-04-10T15: 54: 49. (05-04-2019, 21:53). +1 ,. , , 2019. Shazam! : 14: 5007.11.2018: 00:02:47. ! – Comic-Con 2019 .: 15:58: 00:02:57. ! Comic Con 2019 .: 16:39: 00:03:01. ! – Comic-Con 2019 .: 07:59: 00:02:46. ! -WEBRIP 2019 .: 15:30: 00:02:56. ! – Comic-Con 2019 .: 14: 2600: 32.. 30 1. 0:. :. Shazam! Shazam Encore Shazam Encore 7. (2017) Rus. :: Shezam Entertainment Ltd. ::: Android. : Root ::: apk. , Warner Bros.. , , 20. 14 ,,,,,,,, -. 1970-01-01T03: 00: 00. annok (01-02-2015, 08:06). +1. , , , , 7874-04-10T14: 22: 42. ksuny332010 (28-01-2015, 09:51). +1. 50x50Shazam: – Russia Top 100. 2018 "Shazam: – Russia Top 100" MP3. (50x50Pop (,) Dance Disco Club). : Solo 18-04-2018, 19:03. Album Info HD! ! ! (2019). Shazam! 4 2019. 2019 1080.. , , , ! (2019). : 41: GB. ! :: 0 ..? , Torrent ,,. , To play station Xbox? ! : 2019! 2019! hd! ! ! ! ! 2019 hd! 2019! ! 2019! 2019! 2019! 2019! 2019! 2019! ! 2019 !! ! 2019! hd :! # 0c7! 2019 #yrp! 2019 # 29a! #zmq! hd # 4ac! #xqj.

JohnnieDig
Reviewed by JohnnieDig on
,
! 2019 ar
! 2019 arhttps: //i109.fastpic*****big/2019/0414/2c/158b2d02d4babc05b3713d5448a1462c.jpg! ! !! , ! ,,,,, 2019. 26 – 15, 09:00. ! DC Comics .19: DC. , , , .2019. 76th 2018 HD, 1: 29-03-2019, 09:33 – 3 747! (2019). 2019 Deadpool HD 720 1080 ,. 0 8 2016 20: 38,170. 2019! 27 16+! , 6. Online Jul 21, 2018 – 3 minutes ,. 4 2019 .. DC Marvel! Boris
Rating: 5

,

reactive programming – Hola, We pregunta it como puedo hacer for buscar in a list and Sharepoint go items que yo quiera. Estoy trabajando con react y typscript

Primero adjunto mi constructor:

Constructor (Props: IReactAccordionProps, State: IReactAccordionState) {
Great (props);
this.state = {
status: this.listNotConfigured (this.props)? "Configure List in Web Part Properties": "Done",
Items: [],
listItems: [],
isLoading: false,
loaderMessage: & # 39; & # 39;
};

if (! this.listNotConfigured (this.props)) {
this.readItems ();
}
this.searchTextChange = this.searchTextChange.bind (this);
}

Para Buscar y empty la lista:

private listNotConfigured (Props: IReactAccordionProps): boolean {
return props.listName === undefined ||
props.listName === null ||
props.listName.length === 0;
}

private searchTextChange (event) {

if (event === undefined ||
event === null ||
event === "") {
let listItemsCollection = [...this.state.listItems];
this.setState ({items: listItemsCollection.splice (0, this.props.maxItemsPerPage)});
}
miscellaneous
var updatedList = [...this.state.listItems];
updatedlist = updatedlist.filter ((item) => {
return item.Title.toLowerCase (). search (
event.toLowerCase ())! == -1 || item.Description.toLowerCase (). search (
event.toLowerCase ())! == -1;
});
this.setState ({items: updatedList});
}
}

private readItems (): invalid {
Leave restAPI = this.props.siteUrl + `/ _api / web / Lists / GetByTitle (& # 39; $ {this.props.listName} & 39;) / items? $ select = title, description`;

this.props.spHttpClient.get (restAPI, SPHttpClient.configurations.v1, {
Headers: {
& # 39; Accept & # 39;: & apos; application / json; odata = nometadata & # 39 ;,
& # 39; odata-version & # 39 ;: & # 39; & # 39;
}
})
.then ((Answer: SPHttpClientResponse): Promise<{ value: IAccordionListItem[] }> => {
return response.json ();
})
.then ((answer: {value: IAccordionListItem[] }): void => {

let listItemsCollection = [...response.value];

this.setState ({
Status: "",
items: listItemsCollection.splice (0, this.props.maxItemsPerPage),
listItems: response.value,
isLoading: false,
loaderMessage: ""
});
}, (Error: any): void => {
this.setState ({
Status: & # 39; loading all items failed with error: & # 39; + Mistakes,
Items: [],
isLoading: false,
loaderMessage: ""
});
});

}

Metodo render que muestra la lista

public render (): React.ReactElement {
leave displayLoader;
leave faqTitle;
let {listItems} = this.state;
let pageCountDivisor: number = this.props.maxItemsPerPage;
leave pageCount: number;
let pageButtons = [];

Leave _pagedButtonClick = (pageNumber: number, listData: any) => {
let startIndex: number = (pageNumber - 1) * pageCountDivisor;
let listItemsCollection = [...listData];
this.setState ({items: listItemsCollection.splice (startIndex, pageCountDivisor)});
};

const elements: JSX.Element[] = this.state.items.map ((item: IAccordionListItem, i: number): JSX.Element => {
Return (
        
          
            

{} Item.Title

); }); if (this.state.isLoading) { displayLoader = (
); } miscellaneous displayLoader = (null); } if (this.state.listItems.length> 0) { pageCount = Math.ceil (this.state.listItems.length / pageCountDivisor); } for (let i = 0; i <pageCount; i ++) { pageButtons.push ( {_pagedButtonClick (i + 1, listItems); }}> {i + 1} ); } Return (
{} FaqTitle {Display} loader
{} This.state.status {Items}
{Page buttons}
); }