text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sep;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.JOptionPane;

/**
 *
 *@author JJ.NAVARRETE
 */
public class FrmComplementarDatosPersonales extends javax.swing.JFrame {

    String curp = "";
    String estatus = "";
    String apellido_p = "";
    String apellido_m = "";
    String nombre1 = "";
    String nombre2 = "";
    String sexo = "";
    String fechaNacimiento = "";
    String rfc = "";
    String telLocal = "";
    String cel = "";
    String estado = "";
    String email = "";
    String nacionalidad = "";
    String estadoCivil = "";
    String computadora = "";
    String internet = "";
    String calle = "";
    String numeroExt = "";
    String numeroInt = "";
    String localidad = "";
    String cp = "";
    String municipioResidencia = "";
    String estadoResidencia = "";
    String comentarioDomicilio = "";

    /**
     * Creates new form FrmDatosPersonales
     */
    public FrmComplementarDatosPersonales(String curp) {
        this.curp = curp;
        initComponents();
        cargarDatos();
        jTextFieldCurp.setEditable(false);
    }

    private synchronized void cargarDatos() {
        BD bd = new BD();
        String[] datos = bd.obtenerDatosDocente(this.curp);
        this.estatus = datos[0];
        this.apellido_p = datos[1];
        this.apellido_m = datos[2];
        this.nombre1 = datos[3];
        this.nombre2 = datos[4];
        this.sexo = datos[5];
        this.fechaNacimiento = datos[6];
        this.rfc = datos[7];
        this.telLocal = datos[8];
        this.cel = datos[9];
        this.estado = datos[10];
        this.email = datos[11];
        this.nacionalidad = datos[12];
        this.estadoCivil = datos[13];
        this.computadora = datos[14];
        this.internet = datos[15];
        this.calle = datos[16];
        this.numeroExt = datos[17];
        this.numeroInt = datos[18];
        this.localidad = datos[19];
        this.cp = datos[20];
        this.municipioResidencia = datos[21];
        this.estadoResidencia = datos[22];
        this.comentarioDomicilio = datos[23];
        try {
            jTextFieldCurp.setText(curp);
            jTextFieldEstatus.setText(estatus);
            jTextFieldApellidoP.setText(apellido_p);
            jTextFieldApellidoM.setText(apellido_m);
            jTextFieldNombre1.setText(nombre1);
            jTextFieldNombre2.setText(nombre2);

            switch (sexo) {
                case "Masculino":
                    jRadioButtonMasculino.setSelected(true);
                    break;
                case "Femenino":
                    jRadioButtonFemenino.setSelected(true);
                    break;
            }

            switch (estadoCivil) {
                case "Casado":
                    jRadioButtonCasado.setSelected(true);
                    break;
                case "Soltero":
                    jRadioButtonSoltero.setSelected(true);
                    break;
            }

            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
            if (fechaNacimiento != null) {
                try {

                    Date date = formatter.parse(fechaNacimiento);
                    jDateChooserFecha.setDate(date);

                } catch (ParseException e) {

                }
            }

            jComboBoxEstadoNacimiento.setSelectedItem(estado);

            jTextFieldRFC.setText(rfc);
            jTextFieldTel.setText(telLocal);
            jTextFieldCel.setText(cel);

            jComboBoxNacionalidad.setSelectedItem(nacionalidad);

            switch (computadora) {
                case "Si":
                    jRadioButtonPcSi.setSelected(true);
                    break;
                case "No":
                    jRadioButtonPcNo.setSelected(true);
                    break;
            }

            switch (internet) {
                case "Si":
                    jRadioButtonInternetSi.setSelected(true);
                    break;
                case "No":
                    jRadioButtonInternetNo.setSelected(true);
                    break;
            }

            jTextFieldCalle.setText(calle);
            jTextFieldNoExt.setText(numeroExt);
            jTextFieldNoInt.setText(numeroInt);
            jTextFieldColonia.setText(localidad);
            jTextFieldCP.setText(cp);
            jTextFieldMunicipio.setText(municipioResidencia);

            jComboBoxEstado.setSelectedItem(estadoResidencia);

            jTextFieldEmail.setText(email);

            jTextAreaComentario.setText(comentarioDomicilio);
        } catch (Exception e) {
        }

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroupSexo = new javax.swing.ButtonGroup();
        buttonGroupEstadoCivil = new javax.swing.ButtonGroup();
        buttonGroupPC = new javax.swing.ButtonGroup();
        buttonGroupInternet = new javax.swing.ButtonGroup();
        jTabbedPaneDatosGenerales = new javax.swing.JTabbedPane();
        jPanelDatos = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jTextFieldEstatus = new javax.swing.JTextField();
        jLabelCurp = new javax.swing.JLabel();
        jTextFieldCurp = new javax.swing.JTextField();
        jLabelRFC = new javax.swing.JLabel();
        jTextFieldRFC = new javax.swing.JTextField();
        jLabelApellidoP = new javax.swing.JLabel();
        jTextFieldApellidoP = new javax.swing.JTextField();
        jLabelApellidoM = new javax.swing.JLabel();
        jTextFieldApellidoM = new javax.swing.JTextField();
        jLabelNombre1 = new javax.swing.JLabel();
        jTextFieldNombre1 = new javax.swing.JTextField();
        jLabelNombre2 = new javax.swing.JLabel();
        jTextFieldNombre2 = new javax.swing.JTextField();
        jLabelFechaNacimiento = new javax.swing.JLabel();
        jLabelEstadoNacimiento = new javax.swing.JLabel();
        jComboBoxEstadoNacimiento = new javax.swing.JComboBox();
        jLabelNacionalidad = new javax.swing.JLabel();
        jComboBoxNacionalidad = new javax.swing.JComboBox();
        jLabelSexo = new javax.swing.JLabel();
        jRadioButtonMasculino = new javax.swing.JRadioButton();
        jRadioButtonFemenino = new javax.swing.JRadioButton();
        jLabelEstadoCivil = new javax.swing.JLabel();
        jRadioButtonSoltero = new javax.swing.JRadioButton();
        jRadioButtonCasado = new javax.swing.JRadioButton();
        jDateChooserFecha = new com.toedter.calendar.JDateChooser();
        jButtonGuardar = new javax.swing.JButton();
        jPanelDomicilio = new javax.swing.JPanel();
        jLabelEstado = new javax.swing.JLabel();
        jComboBoxEstado = new javax.swing.JComboBox();
        jLabelEstadoMunicipio = new javax.swing.JLabel();
        jLabelColonia = new javax.swing.JLabel();
        jTextFieldColonia = new javax.swing.JTextField();
        jLabelCalle = new javax.swing.JLabel();
        jTextFieldCalle = new javax.swing.JTextField();
        jLabelNoExt = new javax.swing.JLabel();
        jTextFieldNoExt = new javax.swing.JTextField();
        jLabelNoInt = new javax.swing.JLabel();
        jTextFieldNoInt = new javax.swing.JTextField();
        jLabelCP = new javax.swing.JLabel();
        jTextFieldCP = new javax.swing.JTextField();
        jLabelComentario = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextAreaComentario = new javax.swing.JTextArea();
        jTextFieldMunicipio = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jPanelInfoAdicional = new javax.swing.JPanel();
        jLabelEmail = new javax.swing.JLabel();
        jTextFieldEmail = new javax.swing.JTextField();
        jLabelTel = new javax.swing.JLabel();
        jTextFieldTel = new javax.swing.JTextField();
        jLabelCel = new javax.swing.JLabel();
        jTextFieldCel = new javax.swing.JTextField();
        jLabelPC = new javax.swing.JLabel();
        jRadioButtonPcSi = new javax.swing.JRadioButton();
        jRadioButtonPcNo = new javax.swing.JRadioButton();
        jLabelInternet = new javax.swing.JLabel();
        jRadioButtonInternetSi = new javax.swing.JRadioButton();
        jRadioButtonInternetNo = new javax.swing.JRadioButton();
        jButton2 = new javax.swing.JButton();
        jLabelLogo = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Complementar Datos Personales");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosed(java.awt.event.WindowEvent evt) {
                formWindowClosed(evt);
            }
        });

        jLabel1.setText("Estatus:");

        jLabelCurp.setText("CURP:");

        jLabelRFC.setText("RFC:");

        jLabelApellidoP.setText("Apellido Paterno:");

        jLabelApellidoM.setText("Apellido Materno:");

        jLabelNombre1.setText("Primer Nombre:");

        jLabelNombre2.setText("Segundo Nombre:");

        jLabelFechaNacimiento.setText("Fecha Nacimiento:");

        jLabelEstadoNacimiento.setText("Estado Nacimiento:");

        jComboBoxEstadoNacimiento.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "--Otro--", "Aguascalientes", "Baja California", "Baja California Sur", "Campeche", "Coahuila", "Colima", "Chiapas", "Chihuahua", "Distrito Federal", "Durango", "Guanajuato", "Guerrero", "Hidalgo", "Jalisco", "México", "Michoacán de Ocampo", "Morelos", "Nayarit", "Nuevo León", "Oaxaca", "Puebla", "Querétaro", "Quintana Roo", "San Luis Potosí", "Sinaloa", "Sonora", "Tabasco", "Tamaulipas", "Tlaxcala", "Veracruz", "Yucatán", "Zacatecas" }));

        jLabelNacionalidad.setText("Nacionalidad:");

        jComboBoxNacionalidad.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Argentina", "Arubana", "Bahameña", "Barbadense", "Beliceña", "Boliviana", "Brasileña", "Canadiense", "Chilena", "Colombiana", "Costarricense", "Cubana", "Dominicana", "Dominiquesa", "Ecuatoriana", "Estadounidense", "Guatemalteca", "Guyanesa", "Haitiana", "Hondureña", "Jamaiquina", "Mexicana", "Nicaragüense", "Panameña", "Paraguaya", "Peruana", "Puertorriqueña", "Salvadoreña", "Sancristobaleña", "Santaluciana", "Sanvicentina", "Surinamesa", "Uruguaya", "Venzolana" }));

        jLabelSexo.setText("Sexo:");

        buttonGroupSexo.add(jRadioButtonMasculino);
        jRadioButtonMasculino.setText("Masculino");

        buttonGroupSexo.add(jRadioButtonFemenino);
        jRadioButtonFemenino.setText("Femenino");

        jLabelEstadoCivil.setText("Estado Civil:");

        buttonGroupEstadoCivil.add(jRadioButtonSoltero);
        jRadioButtonSoltero.setText("Soltero");
        jRadioButtonSoltero.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonSolteroActionPerformed(evt);
            }
        });

        buttonGroupEstadoCivil.add(jRadioButtonCasado);
        jRadioButtonCasado.setText("Casado");
        jRadioButtonCasado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonCasadoActionPerformed(evt);
            }
        });

        jDateChooserFecha.setDateFormatString("yyyy-MM-dd");

        jButtonGuardar.setText("Guardar");
        jButtonGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonGuardarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelDatosLayout = new javax.swing.GroupLayout(jPanelDatos);
        jPanelDatos.setLayout(jPanelDatosLayout);
        jPanelDatosLayout.setHorizontalGroup(
            jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDatosLayout.createSequentialGroup()
                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanelDatosLayout.createSequentialGroup()
                        .addGap(42, 42, 42)
                        .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabelSexo)
                            .addComponent(jLabelEstadoCivil))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButtonMasculino)
                            .addComponent(jRadioButtonSoltero))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButtonCasado)
                            .addComponent(jRadioButtonFemenino)
                            .addComponent(jButtonGuardar)))
                    .addGroup(jPanelDatosLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDatosLayout.createSequentialGroup()
                                .addComponent(jLabelNombre2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldNombre2, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDatosLayout.createSequentialGroup()
                                .addComponent(jLabelFechaNacimiento)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jDateChooserFecha, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDatosLayout.createSequentialGroup()
                                .addComponent(jLabelApellidoM)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldApellidoM, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDatosLayout.createSequentialGroup()
                                .addComponent(jLabelApellidoP)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldApellidoP, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDatosLayout.createSequentialGroup()
                                .addComponent(jLabelRFC)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldRFC, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDatosLayout.createSequentialGroup()
                                .addComponent(jLabelCurp)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldCurp, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDatosLayout.createSequentialGroup()
                                .addComponent(jLabelNombre1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldNombre1, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDatosLayout.createSequentialGroup()
                                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabelNacionalidad)
                                    .addComponent(jLabelEstadoNacimiento))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jComboBoxEstadoNacimiento, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jComboBoxNacionalidad, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDatosLayout.createSequentialGroup()
                                .addComponent(jLabel1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldEstatus, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap(37, Short.MAX_VALUE))
        );
        jPanelDatosLayout.setVerticalGroup(
            jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDatosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldEstatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldCurp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelCurp))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelRFC)
                    .addComponent(jTextFieldRFC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelApellidoP)
                    .addComponent(jTextFieldApellidoP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelApellidoM)
                    .addComponent(jTextFieldApellidoM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelNombre1)
                    .addComponent(jTextFieldNombre1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelNombre2, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jTextFieldNombre2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelFechaNacimiento)
                    .addComponent(jDateChooserFecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelEstadoNacimiento)
                    .addComponent(jComboBoxEstadoNacimiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(9, 9, 9)
                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxNacionalidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelNacionalidad))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelSexo)
                    .addComponent(jRadioButtonMasculino)
                    .addComponent(jRadioButtonFemenino))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelDatosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelEstadoCivil)
                    .addComponent(jRadioButtonSoltero)
                    .addComponent(jRadioButtonCasado))
                .addGap(18, 18, 18)
                .addComponent(jButtonGuardar)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPaneDatosGenerales.addTab("Datos Generales", jPanelDatos);

        jLabelEstado.setText("Estado:");

        jComboBoxEstado.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "--Otro--", "Aguascalientes", "Baja California", "Baja California Sur", "Campeche", "Coahuila", "Colima", "Chiapas", "Chihuahua", "Distrito Federal", "Durango", "Guanajuato", "Guerrero", "Hidalgo", "Jalisco", "México", "Michoacán de Ocampo", "Morelos", "Nayarit", "Nuevo León", "Oaxaca", "Puebla", "Querétaro", "Quintana Roo", "San Luis Potosí", "Sinaloa", "Sonora", "Tabasco", "Tamaulipas", "Tlaxcala", "Veracruz", "Yucatán", "Zacatecas" }));

        jLabelEstadoMunicipio.setText("Municipio:");

        jLabelColonia.setText("Colonia:");

        jLabelCalle.setText("Calle:");

        jLabelNoExt.setText("No. Ext:");

        jLabelNoInt.setText("No. Int:");

        jLabelCP.setText("CP:");

        jLabelComentario.setText("Comentario Domicilio:");

        jTextAreaComentario.setColumns(20);
        jTextAreaComentario.setLineWrap(true);
        jTextAreaComentario.setRows(5);
        jScrollPane1.setViewportView(jTextAreaComentario);

        jButton1.setText("Guardar");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelDomicilioLayout = new javax.swing.GroupLayout(jPanelDomicilio);
        jPanelDomicilio.setLayout(jPanelDomicilioLayout);
        jPanelDomicilioLayout.setHorizontalGroup(
            jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDomicilioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jButton1)
                    .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanelDomicilioLayout.createSequentialGroup()
                            .addGap(42, 42, 42)
                            .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(jPanelDomicilioLayout.createSequentialGroup()
                                    .addComponent(jLabelNoInt)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jTextFieldNoInt, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(jPanelDomicilioLayout.createSequentialGroup()
                                        .addComponent(jLabelEstado)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jComboBoxEstado, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanelDomicilioLayout.createSequentialGroup()
                                        .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(jLabelCalle)
                                            .addComponent(jLabelColonia)
                                            .addComponent(jLabelEstadoMunicipio))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jTextFieldColonia, javax.swing.GroupLayout.DEFAULT_SIZE, 132, Short.MAX_VALUE)
                                            .addComponent(jTextFieldCalle, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jTextFieldMunicipio)))
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanelDomicilioLayout.createSequentialGroup()
                                        .addGap(20, 20, 20)
                                        .addComponent(jLabelNoExt)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jTextFieldNoExt, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                        .addGroup(jPanelDomicilioLayout.createSequentialGroup()
                            .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLabelComentario)
                                .addComponent(jLabelCP))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jTextFieldCP)
                                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap(42, Short.MAX_VALUE))
        );
        jPanelDomicilioLayout.setVerticalGroup(
            jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDomicilioLayout.createSequentialGroup()
                .addGap(17, 17, 17)
                .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelEstado)
                    .addComponent(jComboBoxEstado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelEstadoMunicipio)
                    .addComponent(jTextFieldMunicipio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelColonia)
                    .addComponent(jTextFieldColonia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelCalle)
                    .addComponent(jTextFieldCalle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelNoExt)
                    .addComponent(jTextFieldNoExt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelNoInt)
                    .addComponent(jTextFieldNoInt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelCP)
                    .addComponent(jTextFieldCP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelDomicilioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelComentario)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButton1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPaneDatosGenerales.addTab("Domicilio", jPanelDomicilio);

        jLabelEmail.setText("E-Mail:");

        jLabelTel.setText("Tel:");

        jLabelCel.setText("Cel:");

        jLabelPC.setText("Cuenta con PC:");

        buttonGroupPC.add(jRadioButtonPcSi);
        jRadioButtonPcSi.setText("Si");

        buttonGroupPC.add(jRadioButtonPcNo);
        jRadioButtonPcNo.setText("No");

        jLabelInternet.setText("Cuenta con Internet:");

        buttonGroupInternet.add(jRadioButtonInternetSi);
        jRadioButtonInternetSi.setText("Si");

        buttonGroupInternet.add(jRadioButtonInternetNo);
        jRadioButtonInternetNo.setText("No");

        jButton2.setText("Guardar");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelInfoAdicionalLayout = new javax.swing.GroupLayout(jPanelInfoAdicional);
        jPanelInfoAdicional.setLayout(jPanelInfoAdicionalLayout);
        jPanelInfoAdicionalLayout.setHorizontalGroup(
            jPanelInfoAdicionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelInfoAdicionalLayout.createSequentialGroup()
                .addGap(16, 16, 16)
                .addGroup(jPanelInfoAdicionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabelInternet)
                    .addComponent(jLabelEmail)
                    .addComponent(jLabelTel)
                    .addComponent(jLabelCel)
                    .addComponent(jLabelPC))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelInfoAdicionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelInfoAdicionalLayout.createSequentialGroup()
                        .addGroup(jPanelInfoAdicionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextFieldCel, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jTextFieldTel, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jTextFieldEmail, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanelInfoAdicionalLayout.createSequentialGroup()
                                .addComponent(jRadioButtonPcSi)
                                .addGap(18, 18, 18)
                                .addComponent(jRadioButtonPcNo)
                                .addGap(0, 0, Short.MAX_VALUE)))
                        .addGap(470, 470, 470))
                    .addGroup(jPanelInfoAdicionalLayout.createSequentialGroup()
                        .addComponent(jRadioButtonInternetSi)
                        .addGap(18, 18, 18)
                        .addComponent(jRadioButtonInternetNo)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
            .addGroup(jPanelInfoAdicionalLayout.createSequentialGroup()
                .addGap(157, 157, 157)
                .addComponent(jButton2)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        jPanelInfoAdicionalLayout.setVerticalGroup(
            jPanelInfoAdicionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelInfoAdicionalLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelInfoAdicionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelEmail)
                    .addComponent(jTextFieldEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelInfoAdicionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelTel)
                    .addComponent(jTextFieldTel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelInfoAdicionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelCel)
                    .addComponent(jTextFieldCel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelInfoAdicionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelPC)
                    .addComponent(jRadioButtonPcSi)
                    .addComponent(jRadioButtonPcNo))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelInfoAdicionalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelInternet)
                    .addComponent(jRadioButtonInternetSi)
                    .addComponent(jRadioButtonInternetNo))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButton2)
                .addContainerGap(220, Short.MAX_VALUE))
        );

        jTabbedPaneDatosGenerales.addTab("Información Adicional", jPanelInfoAdicional);

        jLabelLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/logoSEP.png"))); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPaneDatosGenerales, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 293, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jLabelLogo)
                .addGap(39, 39, 39))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelLogo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTabbedPaneDatosGenerales, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jRadioButtonSolteroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonSolteroActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButtonSolteroActionPerformed

    private void jRadioButtonCasadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonCasadoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButtonCasadoActionPerformed

    private void jButtonGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonGuardarActionPerformed
        DateFormat fechaFormat = new SimpleDateFormat("yyyy-MM-dd");
        Date fecha = jDateChooserFecha.getDate();
        String fechaSeleccionada = "";

        String estatusNuevo = jTextFieldEstatus.getText();
        String rfcNuevo = jTextFieldRFC.getText();
        String apellidoPNuevo = jTextFieldApellidoP.getText();
        String apellidoMNuevo = jTextFieldApellidoM.getText();
        String nombre1Nuevo = jTextFieldNombre1.getText();
        String nombre2Nuevo = jTextFieldNombre2.getText();
        String sexoNuevo = "";
        String estadoCivilNuevo = "";

        String estadoNacimientoNuevo = jComboBoxEstadoNacimiento.getSelectedItem().toString();

        String nacionalidadNueva = jComboBoxNacionalidad.getSelectedItem().toString();

        if (jRadioButtonMasculino.isSelected()) {
            sexoNuevo = "Masculino";
        }
        if (jRadioButtonFemenino.isSelected()) {
            sexoNuevo = "Femenino";
        }

        if (jRadioButtonCasado.isSelected()) {
            estadoCivilNuevo = "Casado";
        }
        if (jRadioButtonSoltero.isSelected()) {
            estadoCivilNuevo = "Soltero";
        }

        if (fecha != null) {
            try {
                fechaSeleccionada = fechaFormat.format(fecha);
            } catch (Exception e) {
            }
        }

        String[] datos = {estatusNuevo, curp, rfcNuevo, apellidoPNuevo, apellidoMNuevo, nombre1Nuevo, nombre2Nuevo, fechaSeleccionada, estadoNacimientoNuevo, nacionalidadNueva, sexoNuevo, estadoCivilNuevo};
        BD bd = new BD();
        String consulta = bd.actualizarDatosPersonalesDatosGenerales(datos);
        if (consulta.equals("Ok")) {
            JOptionPane.showMessageDialog(this, "Datos guardados correctamente", "Advertencia", JOptionPane.INFORMATION_MESSAGE);
        } else {
            JOptionPane.showMessageDialog(this, "Error al guardar los datos", "Advertencia", JOptionPane.ERROR_MESSAGE);
        }

    }//GEN-LAST:event_jButtonGuardarActionPerformed

    private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed
        cerrar();
    }//GEN-LAST:event_formWindowClosed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        String estadoResidenciaNuevo = jComboBoxEstado.getSelectedItem().toString();
        String municipioNuevo = jTextFieldMunicipio.getText();
        String colonia = jTextFieldColonia.getText();
        String calleNuevo = jTextFieldCalle.getText();
        String noExtNuevo = jTextFieldNoExt.getText();
        String noIntNuevo = jTextFieldNoInt.getText();
        String cpNuevo = jTextFieldCP.getText();
        String comentarioNuevo = jTextAreaComentario.getText();

        String[] datos = {estadoResidenciaNuevo, municipioNuevo, colonia, calleNuevo, noExtNuevo, noIntNuevo, cpNuevo, comentarioNuevo, curp};
        BD bd = new BD();
        String consulta = bd.actualizarDatosPersonalesDomicilio(datos);

        if (consulta.equals("Ok")) {
            JOptionPane.showMessageDialog(this, "Datos guardados correctamente", "Advertencia", JOptionPane.INFORMATION_MESSAGE);
        } else {
            JOptionPane.showMessageDialog(this, "Error al guardar los datos", "Advertencia", JOptionPane.ERROR_MESSAGE);
        }

    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        String emailN = jTextFieldEmail.getText();
        String telN = jTextFieldTel.getText();
        String celN = jTextFieldCel.getText();
        String pc = "";
        String internetN = "";
        if (jRadioButtonPcSi.isSelected()) {
            pc = "Si";
        }

        if (jRadioButtonPcNo.isSelected()) {
            pc = "No";
        }

        if (jRadioButtonInternetSi.isSelected()) {
            internetN = "Si";
        }

        if (jRadioButtonInternetNo.isSelected()) {
            internetN = "No";
        }

        BD bd = new BD();
        String[] datos = {emailN, telN, celN, pc, internetN, curp};
        String consulta = bd.actualizarDatosPersonalesInfoAdicional(datos);
        if (consulta.equals("Ok")) {
            JOptionPane.showMessageDialog(this, "Datos guardados correctamente", "Advertencia", JOptionPane.INFORMATION_MESSAGE);
        } else {
            JOptionPane.showMessageDialog(this, "Error al guardar los datos", "Advertencia", JOptionPane.ERROR_MESSAGE);
        }
    }//GEN-LAST:event_jButton2ActionPerformed

    public synchronized void cerrar() {
        FrmAdminDocente.instancia.dispose();
        FrmAdminDocente frmAdminDocente = new FrmAdminDocente(curp);
        frmAdminDocente.setLocationRelativeTo(null);
        frmAdminDocente.setVisible(true);
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Windows".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FrmComplementarDatosPersonales.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FrmComplementarDatosPersonales.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FrmComplementarDatosPersonales.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FrmComplementarDatosPersonales.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FrmComplementarDatosPersonales("").setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroupEstadoCivil;
    private javax.swing.ButtonGroup buttonGroupInternet;
    private javax.swing.ButtonGroup buttonGroupPC;
    private javax.swing.ButtonGroup buttonGroupSexo;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButtonGuardar;
    private javax.swing.JComboBox jComboBoxEstado;
    private javax.swing.JComboBox jComboBoxEstadoNacimiento;
    private javax.swing.JComboBox jComboBoxNacionalidad;
    private com.toedter.calendar.JDateChooser jDateChooserFecha;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabelApellidoM;
    private javax.swing.JLabel jLabelApellidoP;
    private javax.swing.JLabel jLabelCP;
    private javax.swing.JLabel jLabelCalle;
    private javax.swing.JLabel jLabelCel;
    private javax.swing.JLabel jLabelColonia;
    private javax.swing.JLabel jLabelComentario;
    private javax.swing.JLabel jLabelCurp;
    private javax.swing.JLabel jLabelEmail;
    private javax.swing.JLabel jLabelEstado;
    private javax.swing.JLabel jLabelEstadoCivil;
    private javax.swing.JLabel jLabelEstadoMunicipio;
    private javax.swing.JLabel jLabelEstadoNacimiento;
    private javax.swing.JLabel jLabelFechaNacimiento;
    private javax.swing.JLabel jLabelInternet;
    private javax.swing.JLabel jLabelLogo;
    private javax.swing.JLabel jLabelNacionalidad;
    private javax.swing.JLabel jLabelNoExt;
    private javax.swing.JLabel jLabelNoInt;
    private javax.swing.JLabel jLabelNombre1;
    private javax.swing.JLabel jLabelNombre2;
    private javax.swing.JLabel jLabelPC;
    private javax.swing.JLabel jLabelRFC;
    private javax.swing.JLabel jLabelSexo;
    private javax.swing.JLabel jLabelTel;
    private javax.swing.JPanel jPanelDatos;
    private javax.swing.JPanel jPanelDomicilio;
    private javax.swing.JPanel jPanelInfoAdicional;
    private javax.swing.JRadioButton jRadioButtonCasado;
    private javax.swing.JRadioButton jRadioButtonFemenino;
    private javax.swing.JRadioButton jRadioButtonInternetNo;
    private javax.swing.JRadioButton jRadioButtonInternetSi;
    private javax.swing.JRadioButton jRadioButtonMasculino;
    private javax.swing.JRadioButton jRadioButtonPcNo;
    private javax.swing.JRadioButton jRadioButtonPcSi;
    private javax.swing.JRadioButton jRadioButtonSoltero;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTabbedPane jTabbedPaneDatosGenerales;
    private javax.swing.JTextArea jTextAreaComentario;
    private javax.swing.JTextField jTextFieldApellidoM;
    private javax.swing.JTextField jTextFieldApellidoP;
    private javax.swing.JTextField jTextFieldCP;
    private javax.swing.JTextField jTextFieldCalle;
    private javax.swing.JTextField jTextFieldCel;
    private javax.swing.JTextField jTextFieldColonia;
    private javax.swing.JTextField jTextFieldCurp;
    private javax.swing.JTextField jTextFieldEmail;
    private javax.swing.JTextField jTextFieldEstatus;
    private javax.swing.JTextField jTextFieldMunicipio;
    private javax.swing.JTextField jTextFieldNoExt;
    private javax.swing.JTextField jTextFieldNoInt;
    private javax.swing.JTextField jTextFieldNombre1;
    private javax.swing.JTextField jTextFieldNombre2;
    private javax.swing.JTextField jTextFieldRFC;
    private javax.swing.JTextField jTextFieldTel;
    // End of variables declaration//GEN-END:variables
}


text:
package com.ryft.spark.connector.domain

import spray.json._

case class RDDCount (matches: Long)

object RDDCountProtocol extends DefaultJsonProtocol {
  implicit val rddCountFormat = jsonFormat1(RDDCount)
}

redpajama_set_name: RedPajamaGithub


text:
<?php
/**
 * This makes our life easier when dealing with paths. Everything is relative
 * to the application root now.
 */
chdir(dirname(__DIR__));

// debug
ini_set('display_errors', 1);
ini_set('max_execution_time', 3600); // 1h debug-alive
// end debug

// Decline static file requests back to the PHP built-in webserver
if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) {
    return false;
}

// Setup autoloading
require 'init_autoloader.php';

// Run the application!
Zend\Mvc\Application::init(require 'config/application.config.php')->run();


text:
package com.netflix.exhibitor.core.config;

import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSortedMap;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import javax.annotation.Nullable;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class EncodedConfigParser
{
    private final List<FieldValue> fieldValues;

    public static class FieldValue
    {
        private final String    field;
        private final String    value;

        public FieldValue(String field, String value)
        {
            this.field = field;
            this.value = value;
        }

        public String getField()
        {
            return field;
        }

        public String getValue()
        {
            return value;
        }

        @SuppressWarnings("RedundantIfStatement")
        @Override
        public boolean equals(Object o)
        {
            if ( this == o )
            {
                return true;
            }
            if ( o == null || getClass() != o.getClass() )
            {
                return false;
            }

            FieldValue that = (FieldValue)o;

            if ( !field.equals(that.field) )
            {
                return false;
            }
            if ( !value.equals(that.value) )
            {
                return false;
            }

            return true;
        }

        @Override
        public int hashCode()
        {
            int result = field.hashCode();
            result = 31 * result + value.hashCode();
            return result;
        }
    }

    public EncodedConfigParser(String encodedValue)
    {
        if ( encodedValue == null )
        {
            encodedValue = "";
        }

        ImmutableList.Builder<FieldValue> builder = ImmutableList.builder();

        Set<String>     usedKeys = Sets.newHashSet();
        String[]        parts = encodedValue.split("&");
        try
        {
            for ( String part : parts )
            {
                String[]      subParts = part.split("=");
                if ( subParts.length == 2 )
                {
                    usedKeys.add(subParts[0]);
                    builder.add(new FieldValue(URLDecoder.decode(subParts[0], "UTF-8"), URLDecoder.decode(subParts[1], "UTF-8")));
                }
            }
        }
        catch ( UnsupportedEncodingException e )
        {
            // should never get here
            throw new Error(e);
        }

        fieldValues = builder.build();
    }

    /**
     * @param fieldValues runtime values
     */
    public EncodedConfigParser(List<FieldValue> fieldValues)
    {
        this(fieldValues, false);
    }

    /**
     * @param fieldValues runtime values
     * @param sort if true, sort the values first
     */
    public EncodedConfigParser(List<FieldValue> fieldValues, boolean sort)
    {
        List<FieldValue>        localFieldValues;
        if ( sort )
        {
            localFieldValues = Lists.newArrayList(fieldValues);
            Collections.sort
            (
                localFieldValues,
                new Comparator<FieldValue>()
                {
                    @Override
                    public int compare(FieldValue o1, FieldValue o2)
                    {
                        return o1.getField().compareTo(o2.getField());
                    }
                }
            );
        }
        else
        {
            localFieldValues = fieldValues;
        }

        this.fieldValues = ImmutableList.copyOf(localFieldValues);
    }

    /**
     * Return the values
     *
     * @return values
     */
    public List<FieldValue> getFieldValues()
    {
        return fieldValues;
    }

    /**
     * Return a sorted map of the fields/values
     *
     * @return map
     */
    public Map<String, String> getSortedMap()
    {
        ImmutableSortedMap.Builder<String, String> builder = ImmutableSortedMap.naturalOrder();
        for ( FieldValue fv : fieldValues )
        {
            builder.put(fv.getField(), fv.getValue());
        }

        return builder.build();
    }

    /**
     * Return the value for the given field or null
     *
     * @param field field to check
     * @return value or null
     */
    public String getValue(final String field)
    {
        FieldValue fieldValue = Iterables.find
        (
            fieldValues,
            new Predicate<FieldValue>()
            {
                @Override
                public boolean apply(FieldValue fv)
                {
                    return fv.getField().equals(field);
                }
            },
            null
        );
        return (fieldValue != null) ? fieldValue.getValue() : null;
    }

    /**
     * @return storable value
     */
    public String   toEncoded()
    {
        StringBuilder       str = new StringBuilder();
        try
        {
            for ( FieldValue fv : fieldValues )
            {
                if ( str.length() > 0 )
                {
                    str.append("&");
                }
                str.append(URLEncoder.encode(fv.getField(), "UTF8"));
                str.append("=");
                str.append(URLEncoder.encode(fv.getValue(), "UTF8"));
            }
        }
        catch ( UnsupportedEncodingException e )
        {
            // should never get here
            throw new Error(e);
        }

        return str.toString();
    }
}


text:
namespace TodoListService_ManualJwt
{
    /// <summary>
    /// Constants for claim types.
    /// </summary>
    public static class ClaimConstants
    {
        public const string Name = "name";
        public const string ObjectId = "http://schemas.microsoft.com/identity/claims/objectidentifier";
        public const string Oid = "oid";
        public const string PreferredUserName = "preferred_username";
        public const string TenantId = "http://schemas.microsoft.com/identity/claims/tenantid";
        public const string Tid = "tid";
        public const string ScopeClaimType = "http://schemas.microsoft.com/identity/claims/scope";
        public const string ScpClaimType = "scp";
        public const string RolesClaimType = "roles";

        public const string ScopeClaimValue = "access_as_user";

    }
}


text:
'use strict';

// Define the `phonecatApp` module
angular.module('phonecatApp', [
  'ngAnimate',
  'ngRoute',
  'core',
  'phoneDetail',
  'phoneList',
  'login'
]);


text:
/**
 * @file
 * @brief Private kernel definitions
 *
 * This file contains private kernel structures definitions and various
 * other definitions for the ARCv2 processor architecture.
 *
 * This file is also included by assembly language files which must #define
 * _ASMLANGUAGE before including this header file.  Note that kernel
 * assembly source files obtains structure offset values via "absolute
 * symbols" in the offsets.o module.
 */

#ifndef ZEPHYR_ARCH_ARC_INCLUDE_KERNEL_ARCH_FUNC_H_
#define ZEPHYR_ARCH_ARC_INCLUDE_KERNEL_ARCH_FUNC_H_

#ifdef __cplusplus
extern "C" {
#endif

#if !defined(_ASMLANGUAGE)

#ifdef CONFIG_CPU_ARCV2
#include <v2/cache.h>
#include <v2/irq.h>
#endif

static ALWAYS_INLINE void kernel_arch_init(void)
{
	_irq_setup();
}

static ALWAYS_INLINE void
_set_thread_return_value(struct k_thread *thread, unsigned int value)
{
	thread->arch.return_value = value;
}

/**
 *
 * @brief Indicates the interrupt number of the highest priority
 * active interrupt
 *
 * @return IRQ number
 */
static ALWAYS_INLINE int _INTERRUPT_CAUSE(void)
{
	u32_t irq_num = _arc_v2_aux_reg_read(_ARC_V2_ICAUSE);

	return irq_num;
}

#define _is_in_isr	_arc_v2_irq_unit_is_in_isr

extern void _thread_entry_wrapper(void);
extern void _user_thread_entry_wrapper(void);

extern void _arc_userspace_enter(k_thread_entry_t user_entry, void *p1,
		 void *p2, void *p3, u32_t stack, u32_t size);

#endif /* _ASMLANGUAGE */

#ifdef __cplusplus
}
#endif

#endif /* ZEPHYR_ARCH_ARC_INCLUDE_KERNEL_ARCH_FUNC_H_ */


text:
package io.interfaces;

public interface Reader {

    String readLine();
}


text:
/*	CFPlatformConverters.c
	Copyright (c) 1998-2013, Apple Inc. All rights reserved.
	Responsibility: Aki Inoue
*/

#include "CFInternal.h"
#include <CoreFoundation/CFString.h>
#include "CFStringEncodingConverterExt.h"
#include <CoreFoundation/CFStringEncodingExt.h>
#include "CFUniChar.h"
#include "CFUnicodeDecomposition.h"
#include "CFStringEncodingConverterPriv.h"
#include "CFICUConverters.h"

CF_INLINE bool __CFIsPlatformConverterAvailable(int encoding) {

#if DEPLOYMENT_TARGET_WINDOWS
    return (IsValidCodePage(CFStringConvertEncodingToWindowsCodepage(encoding)) ? true : false);
#else
    return false;
#endif
}

static const CFStringEncodingConverter __CFICUBootstrap = {
    NULL /* toBytes */, NULL /* toUnicode */, 6 /* maxBytesPerChar */, 4 /* maxDecomposedCharLen */,
    kCFStringEncodingConverterICU /* encodingClass */,
    NULL /* toBytesLen */, NULL /* toUnicodeLen */, NULL /* toBytesFallback */,
    NULL /* toUnicodeFallback */, NULL /* toBytesPrecompose */, NULL, /* isValidCombiningChar */
};

static const CFStringEncodingConverter __CFPlatformBootstrap = {
    NULL /* toBytes */, NULL /* toUnicode */, 6 /* maxBytesPerChar */, 4 /* maxDecomposedCharLen */,
    kCFStringEncodingConverterPlatformSpecific /* encodingClass */,
    NULL /* toBytesLen */, NULL /* toUnicodeLen */, NULL /* toBytesFallback */,
    NULL /* toUnicodeFallback */, NULL /* toBytesPrecompose */, NULL, /* isValidCombiningChar */
};

CF_PRIVATE const CFStringEncodingConverter *__CFStringEncodingGetExternalConverter(uint32_t encoding) {

    // we prefer Text Encoding Converter ICU since it's more reliable
    if (__CFIsPlatformConverterAvailable(encoding)) {
        return &__CFPlatformBootstrap;
    } else {
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_WINDOWS || DEPLOYMENT_TARGET_LINUX
        if (__CFStringEncodingGetICUName(encoding)) {
            return &__CFICUBootstrap;
        }
#endif
        return NULL;
    }
}

#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED
CF_PRIVATE CFStringEncoding *__CFStringEncodingCreateListOfAvailablePlatformConverters(CFAllocatorRef allocator, CFIndex *numberOfConverters) {

    return NULL;
}
#elif DEPLOYMENT_TARGET_WINDOWS

#include <tchar.h>

static uint32_t __CFWin32EncodingIndex = 0;
static CFStringEncoding *__CFWin32EncodingList = NULL;

static char CALLBACK __CFWin32EnumCodePageProc(LPTSTR string) {
    uint32_t encoding = CFStringConvertWindowsCodepageToEncoding(_tcstoul(string, NULL, 10));
    CFIndex idx;

    if (encoding != kCFStringEncodingInvalidId) { // We list only encodings we know
        if (__CFWin32EncodingList) {
            for (idx = 0;idx < (CFIndex)__CFWin32EncodingIndex;idx++) if (__CFWin32EncodingList[idx] == encoding) break;
            if (idx != __CFWin32EncodingIndex) return true;
            __CFWin32EncodingList[__CFWin32EncodingIndex] = encoding;
        }
        ++__CFWin32EncodingIndex;
    }
    return true;
}

CF_PRIVATE CFStringEncoding *__CFStringEncodingCreateListOfAvailablePlatformConverters(CFAllocatorRef allocator, CFIndex *numberOfConverters) {
    CFStringEncoding *encodings;

    EnumSystemCodePages((CODEPAGE_ENUMPROC)&__CFWin32EnumCodePageProc, CP_INSTALLED);
    __CFWin32EncodingList = (uint32_t *)CFAllocatorAllocate(allocator, sizeof(uint32_t) * __CFWin32EncodingIndex, 0);
    EnumSystemCodePages((CODEPAGE_ENUMPROC)&__CFWin32EnumCodePageProc, CP_INSTALLED);

    *numberOfConverters = __CFWin32EncodingIndex;
    encodings = __CFWin32EncodingList;

    __CFWin32EncodingIndex = 0;
    __CFWin32EncodingList = NULL;

    return encodings;
}
#else
CF_PRIVATE CFStringEncoding *__CFStringEncodingCreateListOfAvailablePlatformConverters(CFAllocatorRef allocator, CFIndex *numberOfConverters) { return NULL; }
#endif

CF_PRIVATE CFIndex __CFStringEncodingPlatformUnicodeToBytes(uint32_t encoding, uint32_t flags, const UniChar *characters, CFIndex numChars, CFIndex *usedCharLen, uint8_t *bytes, CFIndex maxByteLen, CFIndex *usedByteLen) {

#if DEPLOYMENT_TARGET_WINDOWS
    WORD dwFlags = 0;
    CFIndex usedLen;

    if ((kCFStringEncodingUTF7 != encoding) && (kCFStringEncodingGB_18030_2000 != encoding) && (0x0800 != (encoding & 0x0F00))) { // not UTF-7/GB18030/ISO-2022-*
        dwFlags |= (flags & (kCFStringEncodingAllowLossyConversion|kCFStringEncodingSubstituteCombinings) ? WC_DEFAULTCHAR : 0);
        dwFlags |= (flags & kCFStringEncodingComposeCombinings ? WC_COMPOSITECHECK : 0);
        dwFlags |= (flags & kCFStringEncodingIgnoreCombinings ? WC_DISCARDNS : 0);
    }

    if ((usedLen = WideCharToMultiByte(CFStringConvertEncodingToWindowsCodepage(encoding), dwFlags, (LPCWSTR)characters, numChars, (LPSTR)bytes, maxByteLen, NULL, NULL)) == 0) {
        if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
            CPINFO cpInfo;

            if (!GetCPInfo(CFStringConvertEncodingToWindowsCodepage(encoding), &cpInfo)) {
                cpInfo.MaxCharSize = 1; // Is this right ???
            }
            if (cpInfo.MaxCharSize == 1) {
                numChars = maxByteLen;
            } else {
                usedLen = WideCharToMultiByte(CFStringConvertEncodingToWindowsCodepage(encoding), dwFlags, (LPCWSTR)characters, numChars, NULL, 0, NULL, NULL);
                usedLen -= maxByteLen;
                numChars = (numChars > usedLen ? numChars - usedLen : 1);
            }
            if (WideCharToMultiByte(CFStringConvertEncodingToWindowsCodepage(encoding), dwFlags, (LPCWSTR)characters, numChars, (LPSTR)bytes, maxByteLen, NULL, NULL) == 0) {
                if (usedCharLen) *usedCharLen = 0;
                if (usedByteLen) *usedByteLen = 0;
            } else {
                CFIndex lastUsedLen = 0;

                while ((usedLen = WideCharToMultiByte(CFStringConvertEncodingToWindowsCodepage(encoding), dwFlags, (LPCWSTR)characters, ++numChars, (LPSTR)bytes, maxByteLen, NULL, NULL))) lastUsedLen = usedLen;
                if (usedCharLen) *usedCharLen = (numChars - 1);
                if (usedByteLen) *usedByteLen = lastUsedLen;
            }

            return kCFStringEncodingInsufficientOutputBufferLength;
        } else {
            return kCFStringEncodingInvalidInputStream;
        }
    } else {
        if (usedCharLen) *usedCharLen = numChars;
        if (usedByteLen) *usedByteLen = usedLen;
        return kCFStringEncodingConversionSuccess;
    }
#endif /* DEPLOYMENT_TARGET_WINDOWS */

    return kCFStringEncodingConverterUnavailable;
}

CF_PRIVATE CFIndex __CFStringEncodingPlatformBytesToUnicode(uint32_t encoding, uint32_t flags, const uint8_t *bytes, CFIndex numBytes, CFIndex *usedByteLen, UniChar *characters, CFIndex maxCharLen, CFIndex *usedCharLen) {

#if DEPLOYMENT_TARGET_WINDOWS
    WORD dwFlags = 0;
    CFIndex usedLen;

    if ((kCFStringEncodingUTF7 != encoding) && (kCFStringEncodingGB_18030_2000 != encoding) && (0x0800 != (encoding & 0x0F00))) { // not UTF-7/GB18030/ISO-2022-*
        dwFlags |= (flags & (kCFStringEncodingAllowLossyConversion|kCFStringEncodingSubstituteCombinings) ? 0 : MB_ERR_INVALID_CHARS);
        dwFlags |= (flags & (kCFStringEncodingUseCanonical|kCFStringEncodingUseHFSPlusCanonical) ? MB_COMPOSITE : MB_PRECOMPOSED);
    }

    if ((usedLen = MultiByteToWideChar(CFStringConvertEncodingToWindowsCodepage(encoding), dwFlags, (LPCSTR)bytes, numBytes, (LPWSTR)characters, maxCharLen)) == 0) {
        if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
            CPINFO cpInfo;

            if (!GetCPInfo(CFStringConvertEncodingToWindowsCodepage(encoding), &cpInfo)) {
                cpInfo.MaxCharSize = 1; // Is this right ???
            }
            if (cpInfo.MaxCharSize == 1) {
                numBytes = maxCharLen;
            } else {
                usedLen = MultiByteToWideChar(CFStringConvertEncodingToWindowsCodepage(encoding), dwFlags, (LPCSTR)bytes, numBytes, (LPWSTR)characters, maxCharLen);
                usedLen -= maxCharLen;
                numBytes = (numBytes > usedLen ? numBytes - usedLen : 1);
            }
            while ((usedLen = MultiByteToWideChar(CFStringConvertEncodingToWindowsCodepage(encoding), dwFlags, (LPCSTR)bytes, numBytes, (LPWSTR)characters, maxCharLen)) == 0) {
                if ((--numBytes) == 0) break;
            }
            if (usedCharLen) *usedCharLen = usedLen;
            if (usedByteLen) *usedByteLen = numBytes;

            return kCFStringEncodingInsufficientOutputBufferLength;
        } else {
            return kCFStringEncodingInvalidInputStream;
        }
    } else {
        if (usedCharLen) *usedCharLen = usedLen;
        if (usedByteLen) *usedByteLen = numBytes;
        return kCFStringEncodingConversionSuccess;
    }
#endif /* DEPLOYMENT_TARGET_WINDOWS */

    return kCFStringEncodingConverterUnavailable;
}

CF_PRIVATE CFIndex __CFStringEncodingPlatformCharLengthForBytes(uint32_t encoding, uint32_t flags, const uint8_t *bytes, CFIndex numBytes) {
    CFIndex usedCharLen;
    return (__CFStringEncodingPlatformBytesToUnicode(encoding, flags, bytes, numBytes, NULL, NULL, 0, &usedCharLen) == kCFStringEncodingConversionSuccess ? usedCharLen : 0);
}

CF_PRIVATE CFIndex __CFStringEncodingPlatformByteLengthForCharacters(uint32_t encoding, uint32_t flags, const UniChar *characters, CFIndex numChars) {
    CFIndex usedByteLen;
    return (__CFStringEncodingPlatformUnicodeToBytes(encoding, flags, characters, numChars, NULL, NULL, 0, &usedByteLen) == kCFStringEncodingConversionSuccess ? usedByteLen : 0);
}

#undef __CFCarbonCore_GetTextEncodingBase0


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
using JoyConToPC.API.Type;
using JoyConToPC.TrayIcon.WCF;

namespace JoyConToPC.TrayIcon.UI.Window
{
    internal sealed class JoyConOverviewWindowModel : ModelBase
    {
        public List<CJoyCon> JoyConList { get; } = new List<CJoyCon>();

        public JoyConOverviewWindowModel()
        {
            new Timer { Enabled = true, Interval = 1000}.Elapsed += OnElapsed;
        }

        private void OnElapsed(object sender, ElapsedEventArgs elapsedEventArgs)
        {
            JoyConList.Clear();
            JoyConList.AddRange(JoyConDriverConnectorClient.Instance.GetJoyConList());
        }
    }
}


text:
package gemlite.shell.codegen.database;

import java.util.EnumSet;
import java.util.Set;

public enum SQLDialect
{
  DEFAULT(null, false), H2("H2", false), MYSQL("MySQL", false), ORACLE("Oracle", false), SYBASE("Sybase", false), SQLSERVER(
      "SQLServer", false);
  private static final SQLDialect[] FAMILIES;
  static
  {
    Set<SQLDialect> set = EnumSet.noneOf(SQLDialect.class);
    for (SQLDialect dialect : values())
    {
      set.add(dialect.family());
    }
    FAMILIES = set.toArray(new SQLDialect[set.size()]);
  }
  private final String name;
  private final boolean commercial;
  private final SQLDialect family;
  private SQLDialect predecessor;

  private SQLDialect(String name, boolean commercial)
  {
    this(name, commercial, null, null);
  }

  private SQLDialect(String name, boolean commercial, SQLDialect family)
  {
    this(name, commercial, family, null);
  }

  private SQLDialect(String name, boolean commercial, SQLDialect family, SQLDialect predecessor)
  {
    this.name = name;
    this.commercial = commercial;
    this.family = family == null ? this : family;
    this.predecessor = predecessor == null ? this : predecessor;
    if (family != null)
      family.predecessor = this;
  }

  public final boolean commercial()
  {
    return commercial;
  }

  public final SQLDialect family()
  {
    return family;
  }

  public final SQLDialect predecessor()
  {
    return predecessor;
  }

  public final boolean precedes(SQLDialect other)
  {
    if (family != other.family)
      return false;
    SQLDialect candidate = other;
    while (candidate != null)
    {
      if (this == candidate)
        return true;
      if (candidate == candidate.predecessor())
        return false;
      candidate = candidate.predecessor();
    }
    return false;
  }

  public final String getName()
  {
    return name;
  }

  public final String getNameLC()
  {
    return name == null ? null : name.toLowerCase();
  }

  public final String getNameUC()
  {
    return name == null ? null : name.toUpperCase();
  }

  public static final SQLDialect[] families()
  {
    return FAMILIES.clone();
  }
}


text:
SkQP
====

Development APKs of SkQP are kept in Google storage.  Each file in named
with a abbreviated Git hash that points at the commit in the Skia repository it
was built with.

These are universal APKs that contain native libraries for armeabi-v7a,
arm64-v8a, x86, and x86\_64 architectures. The most recent is listed first.

The listing can be found here:
[https://storage.googleapis.com/skia-skqp/apklist](https://storage.googleapis.com/skia-skqp/apklist)

If you are looking at Android CTS failures, use the most recent commit on the
`origin/skqp/release` branch.

To run tests:

    adb install -r skqp-universal-{APK_SHA_HERE}.apk
    adb logcat -c
    adb shell am instrument -w org.skia.skqp

Monitor the output with:

    adb logcat TestRunner org.skia.skqp skia DEBUG "*:S"

Note the test's output path on the device.  It will look something like this:

    01-23 15:22:12.688 27158 27173 I org.skia.skqp:
    output written to "/storage/emulated/0/Android/data/org.skia.skqp/files/skqp_report_2019-02-28T102058"

Retrieve and view the report with:

    OUTPUT_LOCATION="/storage/emulated/0/Android/data/org.skia.skqp/files/skqp_report_2019-02-28T102058"
    adb pull "$OUTPUT_LOCATION" /tmp/

(Your value of `$OUTPUT_LOCATION` will differ from mine.

Open the file `/tmp/output/skqp_report_2019-02-28T102058/report.html` .

**Zip up that directory to attach to a bug report:**

    cd /tmp
    zip -r skqp_report_2019-02-28T102058.zip skqp_report_2019-02-28T102058
    ls -l skqp_report_2019-02-28T102058.zip

* * *

For more information about building your own APK, refer to
https://skia.googlesource.com/skia/+/master/tools/skqp/README.md


text:
@interface NSView (findSubview)

- (NSArray  *)subviewsOfKind:(Class)kind withTag:(NSInteger)tag;
- (NSArray  *)subviewsOfKind:(Class)kind;

- (NSView  *)firstSubviewOfKind:(Class)kind withTag:(NSInteger)tag;
- (NSView  *)firstSubviewOfKind:(Class)kind;

@end


text:
define(function(require) {
    'use strict';

    const $ = require('jquery');
    const _ = require('underscore');
    const GoogleMaps = require('oroaddress/js/mapservice/googlemaps');
    const ModelAction = require('oro/datagrid/action/model-action');

    const MapAction = ModelAction.extend({
        /**
         * @property {Object}
         */
        options: {
            mapView: GoogleMaps
        },

        /**
         * @property {Boolean}
         */
        dispatched: true,

        /**
         * @inheritDoc
         */
        constructor: function MapAction(options) {
            MapAction.__super__.constructor.call(this, options);
        },

        /**
        * @param {Object} options
        */
        initialize: function(options) {
            MapAction.__super__.initialize.call(this, options);

            this.$mapContainerFrame = $('<div class="map-popover__frame"/>');
            this.mapView = new this.options.mapView({
                el: this.$mapContainerFrame
            });

            this.datagrid.on('rendered', this.onGridRendered, this);
            this.datagrid.on('content:update', this.onGridRendered, this);
        },

        dispose: function() {
            if (this.disposed) {
                return;
            }
            delete this.$mapContainerFrame;
            this.datagrid.off(null, null, this);
            this.subviews[0].$el.off('click');
            MapAction.__super__.dispose.call(this);
        },

        onGridRendered: function() {
            if (!this.subviews.length) {
                return;
            }
            this.subviews[0].$el.on('click', _.bind(this.onActionClick, this));
        },

        /**
         * @param {jQuery.Event} e
         */
        onActionClick: function(e) {
            e.preventDefault();
            this.handlePopover(this.getPopoverConfig());
        },

        getPopoverConfig: function() {
            return _.extend({
                'placement': 'left',
                'container': 'body',
                'animation': false,
                'html': true,
                'closeButton': true,
                'class': 'map-popover',
                'content': this.$mapContainerFrame
            }, this.popoverTpl ? {template: this.popoverTpl} : {});
        },

        /**
         * @param {Object} config
         */
        handlePopover: function(config) {
            const $popoverTrigger = this.subviews[0].$el;

            $popoverTrigger.popover(config).on('shown.bs.popover', _.bind(function() {
                this.mapView.updateMap(this.getAddress(), this.model.get('label'));

                $(document).on('mouseup', _.bind(function(e) {
                    const $map = this.mapView.$el;
                    if (!$map.is(e.target) && !$map.has(e.target).length) {
                        $popoverTrigger.popover('dispose');
                    }
                }, this));
            }, this)).on('hidden.bs.popover', _.bind(function() {
                $(document).off('mouseup', null, this);
            }, this));

            $popoverTrigger.popover('show');
        },

        getAddress: function() {
            return this.model.get('countryName') + ', ' +
                this.model.get('city') + ', ' +
                this.model.get('street') + ' ' + (this.model.get('street2') || '');
        }
    });

    return MapAction;
});


text:
To import nodes from an iCal feed, follow the iCal Import instructions.

After importing, the imported nodes now exist as regular date fields that can be added to your calendar.


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Employee extends CI_Model
{

	public function add_employee()
	{

		$first_name = $this->input->post("first_name");
		$last_name = $this->input->post("last_name");
		$nickname = $this->input->post("nickname");
		$job_title = $this->input->post("job_title");
		$postal_address = $this->input->post("postal_address");
		$email_address = $this->input->post("email_address");
		$phone1 = $this->input->post("phone1");
		$phone2 = $this->input->post("phone2");
		$branch_id = 1;

		$sql = "INSERT INTO Staff(FirstName, LastName, NickName, JobTitle, StaffAddress, Email, PhoneNumber1, PhoneNumber2,
			BranchID)
			VALUES(
				".$this->db->escape($first_name).",
				".$this->db->escape($last_name).",
				".$this->db->escape($nickname).",
				".$this->db->escape($job_title).",
				".$this->db->escape($postal_address).",
				".$this->db->escape($email_address).",
				".$this->db->escape($phone1).",
				".$this->db->escape($phone2).",
				".$this->db->escape($branch_id)."
				)";

		$result = $this->db->query($sql);

		redirect('index.php/salon/employee_list');

	}

	public function list_employees()
	{

		$q = $this->db->select('StaffID, FirstName, LastName, NickName, Email,
			PhoneNumber1, PhoneNumber2,JobTitle, StaffAddress, DateRegistered')
			->from('Staff')
			->order_by('DateRegistered',"desc");

		$ret['rows'] = $q->get()->result();
		return $ret;
		// print_r($ret);

	}

	public function get_phone($id)
	{

		$q = $this->db->select('PhoneNumber1')
			->from('Staff')
			->where('StaffID',$id);
		$ret['rows'] = $q->get()->result();
		return $ret;
//		print_r($ret);
	}

	public function individual_employee($id)
	{

		$q = $this->db->select('StaffID,StaffID, FirstName, LastName, NickName, Email,
			PhoneNumber1, PhoneNumber2, JobTitle, StaffAddress, DateRegistered')
			->from('Staff')
			->where('StaffID', $id); //eg. where('employee_id','5')
		$ret['rows'] = $q->get()->result();
		return $ret;

	}

	public function edit_employee($id)
	{
		$first_name = $this->input->post("first_name");
		$last_name = $this->input->post("last_name");
		$nickname = $this->input->post("nickname");
		$postal_address = $this->input->post("postal_address");
		$email_address = $this->input->post("email_address");
		$phone1 = $this->input->post("phone1");
		$phone2 = $this->input->post("phone2");

		$sql2 = "UPDATE Staff SET FirstName = '$first_name', LastName = '$last_name',NickName = '$nickname', Email = '$email_address', StaffAddress = '$postal_address',PhoneNumber1 = '$phone1', PhoneNumber2 = '$phone2' WHERE StaffID='$id'";
		$this->db->query($sql2);
		return true;
	}

}

?>


text:
using Quiddity.Support;

namespace Quiddity.SPNEGO
{
    class SPNEGONegTokenInit
    {
        /*
        https://tools.ietf.org/html/rfc4178#appendix-A
        */
        public byte[] MechTypes { get; set; }
        public byte[] ReqFlags { get; set; }
        public byte[] MechToken { get; set; }
        public byte[] MechListMIC { get; set; }
        public byte[] NegHints { get; set; }

        public SPNEGONegTokenInit()
        {
            this.MechTypes = new byte[0];
            this.ReqFlags = new byte[10];
            this.MechToken = new byte[0];
            this.MechListMIC = new byte[0];
            this.NegHints = new byte[0];
        }

        public void Decode(byte[] data)
        {
            this.MechTypes = ASN1.GetTagBytes(6, data);
            this.MechToken = ASN1.GetTagBytes(4, data);
        }

    }

}