Problema con tableview javafx – Stack Overflow en español

Intento listar pero no sirve. El metodo donde “enlazo” los datos. en actualizar solo agarro el arraylist que tengo de productos y agrego los que concuerdan con inventario.add(producto). pero si me añade los datos en el observablelist, es como si no se sincronizara con la tabla

@FXML
private TableView<Producto> tablaProductos;

@FXML
private TableView<Producto> tablaCarrito;

@FXML
private TableColumn<Producto, String> columnaNombre1;

@FXML
private TableColumn<Producto, String> columnaNombre2;

@FXML
private TableColumn<Ciudad, String> columnaDepartamento1;

@FXML
private TableColumn<Ciudad, String> columnaDepartamento2;

@FXML
private TableColumn<Ciudad, String> columnaCiudad1;

@FXML
private TableColumn<Ciudad, String> columnaCiudad2;

private ObservableList<Producto> inventario = FXCollections.observableArrayList(),
        carrito = FXCollections.observableArrayList();

private ArrayList<Producto> carro = new ArrayList<Producto>();

@Override
public void initialize(URL location, ResourceBundle resources)
{
    columnaNombre1.setCellValueFactory(new PropertyValueFactory<>("nombre"));
    columnaDepartamento1.setCellValueFactory(new PropertyValueFactory<>("departamento"));
    columnaCiudad1.setCellValueFactory(new PropertyValueFactory<>("ciudad"));

    tablaProductos.setItems(inventario);

    columnaNombre2.setCellValueFactory(new PropertyValueFactory<>("Nombre"));
    columnaDepartamento2.setCellValueFactory(new PropertyValueFactory<>("Departamento"));
    columnaCiudad1.setCellValueFactory(new PropertyValueFactory<>("Ciudad"));

    tablaProductos.setItems(carrito);
}

Aqui la clase Producto, se supone que los nombres de las variables serian las propiedades el PropertyValueFactory. pero no me lista nada de nada

import javafx.beans.property.SimpleStringProperty;
import java

fx.beans.property.StringProperty;

public class Producto
{
    private final int id;
    private final StringProperty nombre, descripcion;
    private final Ciudad ciudad;
    private int cantidad;
    private final double precio;

    public Producto(int id, String nombre, String descripcion, double precio, Ciudad ciudad, int cantidad)
    {
        super();
        this.id = id;
        this.nombre = new SimpleStringProperty(nombre);
        this.descripcion = new SimpleStringProperty(descripcion);
        this.precio = precio;
        this.ciudad = ciudad;
        this.cantidad = cantidad;
    }

    public int getId()
    {
        return id;
    }

    public String getNombre()
    {
        return nombre.get();
    }

    public void setNombre(String nombre)
    {
        this.nombre.set(nombre);
    }

    public String getDescripcion()
    {
        return descripcion.get();
    }

    public void setDescripcion(String descripcion)
    {
        this.descripcion.set(descripcion);
    }

    public double getPrecio()
    {
        return precio;
    }

    public Ciudad getCiudad()
    {
        return ciudad;
    }

    public int getCantidad()
    {
        return cantidad;
    }

    public void setCantidad(int cantidad)
    {
        this.cantidad = cantidad;
    }

}

y por si algo el de ciudad, de igual modo ya eliminé las columnas que acceden a la ciudad y asi pero sigue sin listar ni el nombre del producto

public class Ciudad
{
private int id;
private StringProperty ciudad, dpto;

public Ciudad(int id, String ciudad, String departamento)
{
    super();
    this.id = id;
    this.ciudad = new SimpleStringProperty(ciudad);
    this.dpto = new SimpleStringProperty(departamento);
}

public int getId()
{
    return id;
}

public void setId(int id)
{
    this.id = id;
}

public String getCiudad()
{
    return ciudad.get();
}

public void setCiudad(String ciudad)
{
    this.ciudad.set(ciudad);
}

public String getDepartamento()
{
    return dpto.get();
}

public void setDepartamento(String departamento)
{
    this.dpto.set(departamento);
}

}

SQL CONSULTA MULTITABLA – Stack Overflow en español

select OEHR_CUSTOMERS.cust_first_name ||' '|| OEHR_CUSTOMERS.cust_last_name, count(OEHR_ORDERS.order_id)
from OEHR_CUSTOMERS LEFT JOIN OEHR_ORDERS ON OEHR_CUSTOMERS.customer_id=OEHR_ORDERS.customer_id
where OEHR_ORDERS.order_id > 4
group by cust_first_name, cust_last_name, order_id

Necesito sacar los clientes que han hecho 4 o más ordenes. Ayudaaaa
introducir la descripción de la imagen aquí

Search javascript en Django – Stack Overflow en español

tengo el siguiente código javascript para hacer una búsqueda (search con botón en la barra) en una página en Django 2.2, funciona pero me lo resalta por menos de 1 segundo, es decir encuentra la palabra la resalta y ya no la resalta más, como dije lo hace menos de 1 segundo y la idea es que quede marcada y en lo posible que siga mostrando otras coincidencias como hace CTRL + F en los navegadores. Alguien puede ayudarme con un código que sí funcione bien? Gracias.

<script type="text/javascript">
  function FindNext () {
    var str = document.getElementById ("findInput").value;
    if (str == "") {
      alert ("Por favor, introduzca un texto para buscar!");
      return;
    }

    if (window.find) {        // Firefox, Google Chrome, Safari
      var found = window.find (str);
      if (!found) {
        alert ("No se encontró el siguiente texto:n" + str);
      }
    }
    else {
      alert ("Su navegador no es compatible!");
    }
  }
</script>

Intent Fail Android Java – Stack Overflow en español

Greeting everyone, i am an amateur android developer and I want to open an excel file with a button in my app but it do not work, I’ve tried everything but there is something wrong that I did not notice maybe in the manifest or somewhere else.

Here is my code of the mainActivity please help me finding the error.

Greeting everyone, i am an amateur android developer and I want to open an excel file with a button in my app but it do not work, I've tried everything but there is something wrong that I did not notice maybe in the manifest or somewhere else.

Here is my code of the mainActivity please help me finding the error.

public class MainActivity extends AppCompatActivity {

    private Button intentButton;
    private TextView tvContainer;
    private TextView linked;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        intentButton = findViewById(R.id.intentButton);
        tvContainer = findViewById(R.id.tvContainer);
        linked = findViewById(R.id.linked);

        intentButton.setOnClickListener(openFile);

    }


    private View.OnClickListener openFile = new View.OnClickListener() {
        @Override
        public void onClick(View v)
        {
            Intent sendIntent = new Intent();
            sendIntent.setAction(Intent.ACTION_VIEW);
            String directorioRaiz = Environment.getExternalStorageDirectory().getPath()+"/Excels/2-6.xlsx";
            System.out.println(directorioRaiz);
            Uri uri = Uri.parse(directorioRaiz);
            System.out.println(uri.getPath());
            sendIntent.setDataAndType(uri,"application/vnd.ms-excel");
            String title = getResources().getString(R.string.app_name);

            Intent chooser = Intent.createChooser(sendIntent, title);

            if (sendIntent.resolveActivity(getPackageManager()) != null) {
                startActivity(chooser);

            }
        }
    };

}

Please a little help.

android – PreferenceFragmentCompat crash – stack overflow en español

I'm trying to change a fragment for a PreferenceFragmentCompat in the MainActivity. When I create an activity, everything works fine, but changing fragments gives me an error.

My ultimate goal is to change fragments, including adjustment, from a menu without using any activity to get to the settings.

I searched for pages, but any solutions I found were out of date or not useful.

public class ajustes_fragment extends PreferenceFragmentCompat {
    @Override
    public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
        // Load the preferences from an XML resource
        setPreferencesFromResource(R.xml.preferencias, rootKey);
        setPreferenceScreen(R.layout.activity_ajustes);
    }
}

Call to fragment:

PreferenceFragmentCompat newFragment = new ajustes_fragment();
                        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
                        transaction.replace(R.id.container, newFragment);
                        transaction.addToBackStack(null);
                        transaction.commit();

I also tried:

Fragment newFragment = new ajustes_fragment();
                        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
                        transaction.replace(R.id.container, newFragment);
                        transaction.addToBackStack(null);
                        transaction.commit();

error:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.proyectoss, PID: 28344
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Object.equals(java.lang.Object)' on a null object reference
        at androidx.preference.ListPreference.findIndexOfValue(ListPreference.java:225)
        at androidx.preference.ListPreference.getValueIndex(ListPreference.java:245)
        at androidx.preference.ListPreference.getEntry(ListPreference.java:212)
        at androidx.preference.ListPreference.getSummary(ListPreference.java:164)
        at androidx.preference.Preference.onBindViewHolder(Preference.java:510)
        at androidx.preference.PreferenceGroupAdapter.onBindViewHolder(PreferenceGroupAdapter.java:418)
        at androidx.preference.PreferenceGroupAdapter.onBindViewHolder(PreferenceGroupAdapter.java:47)
        at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7065)
        at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7107)
        at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6012)
        at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6279)
        at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118)
        at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114)
        at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
        at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1627)
        at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
        at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665)
        at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4134)
        at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3851)
        at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4404)
        at android.view.View.layout(View.java:22398)
        at android.view.ViewGroup.layout(ViewGroup.java:6577)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:22398)
        at android.view.ViewGroup.layout(ViewGroup.java:6577)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
        at android.view.View.layout(View.java:22398)
        at android.view.ViewGroup.layout(ViewGroup.java:6577)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:22398)
        at android.view.ViewGroup.layout(ViewGroup.java:6577)
        at androidx.constraintlayout.widget.ConstraintLayout.onLayout(ConstraintLayout.java:1915)
        at android.view.View.layout(View.java:22398)
        at android.view.ViewGroup.layout(ViewGroup.java:6577)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:22398)
        at android.view.ViewGroup.layout(ViewGroup.java:6577)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
        at android.view.View.layout(View.java:22398)
        at android.view.ViewGroup.layout(ViewGroup.java:6577)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:22398)
        at android.view.ViewGroup.layout(ViewGroup.java:6577)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
E/AndroidRuntime:     at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
        at android.view.View.layout(View.java:22398)
        at android.view.ViewGroup.layout(ViewGroup.java:6577)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at com.android.internal.policy.DecorView.onLayout(DecorView.java:1042)
        at android.view.View.layout(View.java:22398)
        at android.view.ViewGroup.layout(ViewGroup.java:6577)
        at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3363)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2827)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1873)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8478)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
        at android.view.Choreographer.doCallbacks(Choreographer.java:761)
        at android.view.Choreographer.doFrame(Choreographer.java:696)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:6986)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1445)
I/Process: Sending signal. PID: 28344 SIG: 9

Any help on this would be appreciated. I am a new user of Android Studio.

Use automysqlbackup in docker-compose – Stack Overflow en español

Before using Docker in my project, I used automysqlbackup to back up the MySQL database and it was emailed daily (using crontab).

But now I'm using Docker and don't know how to use automysqlbackup in the Docker Compose or Docker file. Because it needs a configuration that I can't do with Docker commands.

What do you think is the best way to backup MySQL using Docker and Crontab?

Sincerely yours,

Agus

Angular VirtualScrolling – Stack Overflow de español

Tengo un formulario realizado con angular 6 The correct function has been performed to fix an Angular 7 error.

ERROR NullInjectorError: "StaticInjectorError (AppModule)[RouterScroller -> ViewportScroller]:
StaticInjectorError (platform: core)[RouterScroller -> ViewportScroller]:
NullInjectorError: No provider for ViewportScroller! "

The intention to use a module for Scroller without function

Pero no me genera error al copilar, mi archivo app.module.ts es el siguiente.

{BrowserModule} from & # 39; @ angle / platform-browser & # 39; import;
{NgModule} from & # 39; @ angle / core & # 39; import;
{AppRoutingModule} from & # 39; ./ app-routing.module & # 39; import;

{FormularioComponent} from & # 39; / formulario / formulario.component & # 39; import;
{InputTextModule} off & # 39; primeng / inputtext & # 39; import;
import {FormsModule, ReactiveFormsModule} from & # 39;; @ angular / forms & # 39 ;;
{DropdownModule} off & # 39; primeng / dropdown & # 39; import;
{BrowserAnimationsModule} from & # 39; @ angle / platform-browser / animations & # 39; import;
{InputSwitchModule} off & # 39; primeng / inputswitch & # 39; import;
{CalendarModule} off & # 39; primeng / calendar & # 39; import;
{EditorModule} from & # 39; primeng / editor & # 39; import;
{FileUploadModule} off & # 39; primeng / fileupload & # 39; import;
{HttpClientModule} from & # 39; @ angle / common / http & # 39; import;
{ConfirmationService, MessageService} off & # 39; primeng / api & # 39; import;
{UtilitiesService} from & # 39; ./share/service/utilities.service & # 39; import;
{UsuarioService} from & # 39; ./share/service/usuario.service & # 39; import;
{RegionalService} from & # 39; ./share/service/regional.service & # 39; import;
{SolicitudService} from & # 39; ./share/service/solicitud.service & # 39; import;
{ConfirmDialogModule} off & # 39; primeng / confirmdialog & # 39; import;
{ModalModule} from # ngx-bootstrap & # 39; import;
{ToastModule} off & # 39; primeng / toast & # 39; import;
{ListboxModule} from & # 39; primeng / listbox & # 39; import;
{MultiSelectModule} off & # 39; primeng / multiselect & # 39; import;
{AppComponent} from & # 39; ./ app.component & # 39; import;
{CaptchaModule} off & # 39; primeng / captcha & # 39; import;

@NgModule ({
Explanations: [
     AppComponent,
     FormularioComponent
  ].
imports: [
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule,
    ReactiveFormsModule,
    AppRoutingModule,
    InputTextModule,
    DropdownModule,
    InputSwitchModule,
    CalendarModule,
    EditorModule,
    FileUploadModule,
    HttpClientModule,
    ConfirmDialogModule,
    ModalModule.forRoot(),
    ToastModule,
    ListboxModule,
    MultiSelectModule,
    CaptchaModule


    ].
Providers: [MessageService,UtilitiesService UsuarioService,RegionalService,SolicitudService,ConfirmationService].
bootstrap: [AppComponent,FormularioComponent]
   })
Export class AppModule {}

Esta son read versiones que estoy manejando.

Angular CLI: 7.3.9
Node: 8.16.0
Operating system: Linux x64
Angle: 8.1.0
... Vein

package version
-------------------------------------------------- -----------
@ angle-devkit / architect 0.13.9
@ angle-devkit / build-angular 0.13.9
@ angle-devkit / build-optimizer 0.13.9
@ angle-devkit / build-webpack 0.13.9
@ angle-devkit / core 7.3.9
@ angle-devkit / schematics 7.3.9
@ angle / animations 7.2.15
@ angle / cdk 8.0.2
@ angle / cli 7.3.9
@ Angular / Common 7.2.15
@ angle / compiler 7.2.15
@ angle / compiler-cli 7.2.15
@ angular / Shapes 7.2.15
@ angle / language-service 7.2.15
@ angular / material 8.0.2
@ angle / platform-browser 7.2.15
@ angle / platform-browser-dynamic 7.2.15
@ angle / router 7.2.15
@ ngtools / webpack 7.3.9
@ schematics / angular 7.3.9
@schematic / update 0.13.9
rxjs 6.3.3
Typescript 3.2.4
Webpack 4.29.

Gracias

html – Paginación Bootstrap – Stack Overflow de español

You can use the Bootstrap page (Too esto para un curso), the JavaScript ban, Solo el que ya tiene Bootstrap. Mezcle la función de carousell con paginación, para poder meter contenido and usar los paginación de flechas de los costados. The problems can be solved and solved on the 1st, 2nd and 3rd day and night? Many Thanks.




  
  Document
  
  
  
  



  


Crear arreglo en angle – Stack Overflow en español

Quiero crear una lista en angle 6 pero obtengo error:

ERROR Error: Unrecognized (Promising): TypeError: The property & # 39; push & # 39; from undefined can not be read
TypeError: Property & # 39; Push & # 39; from undefined can not be read
at DatasComponent. (datas.component.ts: 23)

este es mi codigo:

Export class DatasComponent implements OnInit {
private listUsers: object[];

Constructor (private datasService: DatasService) {
console.log (this.datasService);
}

async ngOnInit () {

this.listUsers.push (waitit this.datasService.getUsers ());
}
}