php – Magento2 MiBPHP fatal error Unable to declare class Less_Version

I have this error when I try to make a compilation …

Fatal error: Can not declare class Less_Version because the name is already used in /app/code/Plazathemes/Layout/Block/lib/Less/Version.php on line 9

Details:
Operating system: Debian GNU / Linux 9.11 (stretch) x86_64
PHP 7.0.33-0 + deb9u6 (cli)
MariaDB
Magento: 2.2.3

Thank you

unit – Error CS1585: The member modifier & # 39; private & # 39; must precede the type and name of the member

As Casanova says, it seems like your problem is here:

public UnityStandardAssets.Characters.FirstPerson.MouseLook

// Use this for initialization 
private void Start()
{

Note that you have not finished writing the statement of your MouseLook field or end the line with a semicolon. The analyzer therefore calculates that the declaration must continue on one of the following lines. He continues to read, ignoring spaces and comments, until he has a complete statement. In his reading, he thinks you are trying to say this:

public UnityStandardAssets...MouseLook private void Start() { ...

… which is gibberish. This is not a valid statement in C #, so it fails to parse and tells you the first thing it found that was wrong with the statement, namely that you have private after the type, when modifiers like this must be preceded by the type. That's true, but in context, the real solution is:

public UnityStandardAssets.Characters.FirstPerson.MouseLook giveThisVariableAName;

// Use this for initialization
public void Start()
{

Now, there is a complete statement that the parser must find:

public      UnityStandardAssets...MouseLook    giveThisVariableAName  ;
 ^ Modifier   ^ Type                            ^ Identifier          ^ End of Line

So he analyzes the Start statement as his own separate statement, rather than trying to interpret it as a continuation of the line above.

This is a basic programming syntax error that does not require game-specific expertise. So you should always check our partner site, general programming, StackOverflow, for topics like this one. Often you will find them already answered, sometimes several times.

java – Error while starting javaFx application

I am new to the area and this can be a stupid mistake, but when starting my application I get the error

javafx.fxml.LoadException: 
/C:/Users/jeffe/Documents/Github/ProjetoQuestion/Projeto-Question-view/bin/br/com/question/views/Pergunta.fxml

    at javafx.fxml/javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2625)
    at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2603)
    at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2466)
    at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3237)
    at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3194)
    at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3163)
    at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3136)
    at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3113)
    at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:3106)
    at br.com.question.main.Main.start(Main.java:22)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
    at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.NullPointerException
    at br.com.question.entidades.Pergunta.(Pergunta.java:14)
    at br.com.question.controller.PerguntaController.gerarPergunta(PerguntaController.java:50)
    at br.com.question.controller.PerguntaController.initialize(PerguntaController.java:20)
    at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2573)

follows the class I use.

package br.com.question.controller;

import java.net.URL;
import java.util.Collections;
import java.util.List;
import java.util.ResourceBundle;
import br.com.question.entidades.Pergunta;
import br.com.question.interfaces.PerguntasRepositorio;
import br.com.question.main.Main;
import br.com.question.respositorio.Perguntas;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;

public class PerguntaController implements Initializable {

    @Override
    public void initialize(URL arg0, ResourceBundle arg1) {
        gerarPergunta();
    }

    @FXML
    private Label txtPergunta;
    @FXML
    private Label txtAlternativa1;
    @FXML
    private Label txtAlternativa2;
    @FXML
    private Label txtAlternativa3;
    @FXML
    private Label txtAlternativa4;
    @FXML
    private Label txtAlternativa5;

    @FXML
    public void btSair(ActionEvent e) {
        Main.mudarTela("");
    }

    @FXML
    public void btOk(ActionEvent e) {
        gerarPergunta();
    }

    private void gerarPergunta() {
        PerguntasRepositorio perguntaRepositorio = new Perguntas();
        List perguntas = perguntaRepositorio.selecionar();
        if(perguntas.isEmpty()) {
            Pergunta pergunta = new Pergunta("Qual a capital do Brasil?", "Brasilia", "Salvador", "Manaus",
                    "Rio de Janeiro", "São Paulo");
            Pergunta pergunta2 = new Pergunta("Quem descobriu o Brasil", "Cabral", "Quem disse que ele estava coberto",
                    "Aladdin", "Simba", "Pedro I");
            perguntas.add(pergunta);
            perguntas.add(pergunta2);
        }
        Collections.shuffle(perguntas);
        txtPergunta.setText(perguntas.get(0).getPergunta());
        txtAlternativa1.setText("A - " + perguntas.get(0).gerarAlternativas().get(0));
        txtAlternativa2.setText("B - " + perguntas.get(0).gerarAlternativas().get(1));
        txtAlternativa3.setText("C - " + perguntas.get(0).gerarAlternativas().get(2));
        txtAlternativa4.setText("D - " + perguntas.get(0).gerarAlternativas().get(3));
        txtAlternativa5.setText("E - " + perguntas.get(0).gerarAlternativas().get(4));
    }

}
package br.com.question.entidades;

import java.util.Collections;
import java.util.List;

public class Pergunta {
    private String pergunta;
    private String respostaCorreta;
    private List alternativas;

    public Pergunta(String pergunta, String alternativa, String alternativa1, String alternativa2, String alternativa3, String alternativa4) {
        this.pergunta = pergunta;
        this.respostaCorreta = alternativa;
        this.alternativas.add(alternativa);
        this.alternativas.add(alternativa1);
        this.alternativas.add(alternativa2);
        this.alternativas.add(alternativa3);
        this.alternativas.add(alternativa4);


    }

    public Boolean responder(String resposta) {
        if(this.respostaCorreta.equals(resposta)) {
            return true;
        }
        else {
            return false;
        }
    }
    public List gerarAlternativas() {
        Collections.shuffle(alternativas);
        return alternativas;
    }

    public String getPergunta() {
        return pergunta;
    }


}
package br.com.question.interfaces;

import java.util.List;

public interface PerguntasRepositorio {
    List selecionar();
    void adicionar(T entidade);
    void excluir(T entidade);

}
package br.com.question.respositorio;

import java.util.ArrayList;
import java.util.List;

import br.com.question.entidades.Pergunta;
import br.com.question.interfaces.PerguntasRepositorio;

public class Perguntas implements PerguntasRepositorio {

    private List perguntas = new ArrayList();

    @Override
    public List selecionar() {

        return perguntas;
    }

    @Override
    public void adicionar(Pergunta pergunta) {
        this.perguntas.add(pergunta);
    }

    @Override
    public void excluir(Pergunta pergunta) {
        this.perguntas.remove(pergunta);

    }

}

I know I have to start the list before handling and I'm doing it here

if(perguntas.isEmpty()) {
            Pergunta pergunta = new Pergunta("Qual a capital do Brasil?", "Brasilia", "Salvador", "Manaus",
                    "Rio de Janeiro", "São Paulo");
            Pergunta pergunta2 = new Pergunta("Quem descobriu o Brasil", "Cabral", "Quem disse que ele estava coberto",
                    "Aladdin", "Simba", "Pedro I");
            perguntas.add(pergunta);
            perguntas.add(pergunta2);

But I always have the mistake, I really do not know what to do.

stored procedures – After upgrading the database to SQL Server 2019, the SP generates an "out of memory" error

I moved a SQL Server 2012 database (size 8 GB) to a newly configured SQL Server 2019 virtual machine with the same memory and CPU configuration and changed the compatibility level in SQL Server 2019. Everything works correctly in my application, except for a stored procedure. which consists of a large SQL query with two parameters (and no fancy option). When executed, this SP allows the SQL Server process memory to reach the specified maximum level, and then returns the error "There is not enough memory to execute this request".

When I run the SQL query (inside the stored procedure) outside of it, in a clean query window in SSMS, it runs in no time and returns the 300 lines expected. Additionally, when I change the compatibility level of the database on "SQL Server 2017" and run the stored procedure, everything is fine.

I first thought that it might be a problem of parameter detection, but none of the workarounds worked (for example, OPTION (RECOMPILE)).

What other cause might be causing the error or could I have found a bug in SQL Server 2019?
Thank you very much! Anne

c # – Unit Error CS1585: The Private Member Modifier & # 39; must precede the type and name of the member

I correct errors in my script after having meticulously worked them, but this one puzzles me, even if I am sure that it is something very simple. Here is the following error:

Assets Scripts Movement_Scripts FirstPersonCharacter Scripts FirstPersonController.cs (44,9):
error CS1585: the private member modifier must precede the type of member
and name

From my script:

using UnityEngine;
using UnityStandardAssets.CrossPlatformInput;
using UnityStandardAssets.Utility;
using Random = UnityEngine.Random;
using MouseLook = UnityEngine.MouseLook;

public class FirstPersonController : MonoBehaviour
{
    (SerializeField) private bool m_IsWalking;
    (SerializeField) private float m_WalkSpeed;
    (SerializeField) private float m_RunSpeed;
    (SerializeField) (Range(0f, 1f)) private float m_RunstepLenghten;
    (SerializeField) private float m_JumpSpeed;
    (SerializeField) private float m_StickToGroundForce;
    (SerializeField) private float m_GravityMultiplier;
    (SerializeField) private MouseLook m_MouseLook;
    (SerializeField) private bool m_UseFovKick;
    (SerializeField) private FOVKick m_FovKick = new FOVKick();
    (SerializeField) private bool m_UseHeadBob;
    (SerializeField) private CurveControlledBob m_HeadBob = new CurveControlledBob();
    (SerializeField) private LerpControlledBob m_JumpBob = new LerpControlledBob();
    (SerializeField) private float m_StepInterval;
    (SerializeField) private AudioClip() m_FootstepSounds;    // an array of footstep sounds that will be randomly selected from.
    (SerializeField) private AudioClip m_JumpSound;           // the sound played when character leaves the ground.
    (SerializeField) private AudioClip m_LandSound;           // the sound played when character touches back on ground.

    private Camera m_Camera;
    private bool m_Jump;
    private float m_YRotation;
    private Vector2 m_Input;
    private Vector3 m_MoveDir = Vector3.zero;
    private CharacterController m_CharacterController;
    private CollisionFlags m_CollisionFlags;
    private bool m_PreviouslyGrounded;
    private Vector3 m_OriginalCameraPosition;
    private float m_StepCycle;
    private float m_NextStep;
    private bool m_Jumping;
    private AudioSource m_AudioSource;
    readonly AudioSource AudioSource;
    public UnityStandardAssets.Characters.FirstPerson.MouseLook

        // Use this for initialization 
        private void Start()
    {
        m_CharacterController = GetComponent();
        m_Camera = Camera.main;
        m_OriginalCameraPosition = m_Camera.transform.localPosition;
        m_FovKick.Setup(m_Camera);
        m_HeadBob.Setup(m_Camera, m_StepInterval);
        m_StepCycle = 0f;
        m_NextStep = m_StepCycle / 2f;
        m_Jumping = false;
        m_AudioSource = GetComponent();
        m_MouseLook.Init(transform, m_Camera.transform);
    }


        // Update is called once per frame
        private void Update()
        {
            RotateView();
            // the jump state needs to read here to make sure it is not missed
            if (!m_Jump)
            {
                m_Jump = CrossPlatformInputManager.GetButtonDown("Jump");
            }

            if (!m_PreviouslyGrounded && m_CharacterController.isGrounded)
            {
                StartCoroutine(m_JumpBob.DoBobCycle());
                PlayLandingSound();
                m_MoveDir.y = 0f;
                m_Jumping = false;
            }
            if (!m_CharacterController.isGrounded && !m_Jumping && m_PreviouslyGrounded)
            {
                m_MoveDir.y = 0f;
            }

            m_PreviouslyGrounded = m_CharacterController.isGrounded;
        }


        private void PlayLandingSound()
        {
            m_AudioSource.clip = m_LandSound;
            m_AudioSource.Play();
            m_NextStep = m_StepCycle + .5f;
        }


        private void FixedUpdate()
        {
            float speed;
            GetInput(out speed);
            // always move along the camera forward as it is the direction that it being aimed at
            Vector3 desiredMove = transform.forward*m_Input.y + transform.right*m_Input.x;

            // get a normal for the surface that is being touched to move along it
            RaycastHit hitInfo;
            Physics.SphereCast(transform.position, m_CharacterController.radius, Vector3.down, out hitInfo,
                               m_CharacterController.height/2f, Physics.AllLayers, QueryTriggerInteraction.Ignore);
            desiredMove = Vector3.ProjectOnPlane(desiredMove, hitInfo.normal).normalized;

            m_MoveDir.x = desiredMove.x*speed;
            m_MoveDir.z = desiredMove.z*speed;


            if (m_CharacterController.isGrounded)
            {
                m_MoveDir.y = -m_StickToGroundForce;

                if (m_Jump)
                {
                    m_MoveDir.y = m_JumpSpeed;
                    PlayJumpSound();
                    m_Jump = false;
                    m_Jumping = true;
                }
            }
            else
            {
                m_MoveDir += Physics.gravity*m_GravityMultiplier*Time.fixedDeltaTime;
            }
            m_CollisionFlags = m_CharacterController.Move(m_MoveDir*Time.fixedDeltaTime);

            ProgressStepCycle(speed);
            UpdateCameraPosition(speed);

            m_MouseLook.UpdateCursorLock();
        }


        private void PlayJumpSound()
        {
            m_AudioSource.clip = m_JumpSound;
            m_AudioSource.Play();
        }


        private void ProgressStepCycle(float speed)
        {
            if (m_CharacterController.velocity.sqrMagnitude > 0 && (m_Input.x != 0 || m_Input.y != 0))
            {
                m_StepCycle += (m_CharacterController.velocity.magnitude + (speed*(m_IsWalking ? 1f : m_RunstepLenghten)))*
                             Time.fixedDeltaTime;
            }

            if (!(m_StepCycle > m_NextStep))
            {
                return;
            }

            m_NextStep = m_StepCycle + m_StepInterval;

            PlayFootStepAudio();
        }


        private void PlayFootStepAudio()
        {
            if (!m_CharacterController.isGrounded)
            {
                return;
            }
            // pick & play a random footstep sound from the array,
            // excluding sound at index 0
            int n = Random.Range(1, m_FootstepSounds.Length);
            m_AudioSource.clip = m_FootstepSounds(n);
            m_AudioSource.PlayOneShot(m_AudioSource.clip);
            // move picked sound to index 0 so it's not picked next time
            m_FootstepSounds(n) = m_FootstepSounds(0);
            m_FootstepSounds(0) = m_AudioSource.clip;
        }


        private void UpdateCameraPosition(float speed)
        {
            Vector3 newCameraPosition;
            if (!m_UseHeadBob)
            {
                return;
            }
            if (m_CharacterController.velocity.magnitude > 0 && m_CharacterController.isGrounded)
            {
                //m_Camera.transform.localPosition =
                    //m_HeadBob.DoHeadBob(m_CharacterController.velocity.magnitude +
                                      //(speed*(m_IsWalking ? 1f : m_RunstepLenghten)));
                newCameraPosition = m_Camera.transform.localPosition;
                newCameraPosition.y = m_Camera.transform.localPosition.y - m_JumpBob.Offset();
            }
            else
            {
                newCameraPosition = m_Camera.transform.localPosition;
                newCameraPosition.y = m_OriginalCameraPosition.y - m_JumpBob.Offset();
            }
            //m_Camera.transform.localPosition = newCameraPosition;
        }


        private void GetInput(out float speed)
        {
            // Read input
            float horizontal = CrossPlatformInputManager.GetAxis("Horizontal");
            float vertical = CrossPlatformInputManager.GetAxis("Vertical");

            bool waswalking = m_IsWalking;

#if !MOBILE_INPUT
            // On standalone builds, walk/run speed is modified by a key press.
            // keep track of whether or not the character is walking or running
            m_IsWalking = !Input.GetKey(KeyCode.LeftShift);
#endif
            // set the desired speed to be walking or running
            speed = m_IsWalking ? m_WalkSpeed : m_RunSpeed;
            m_Input = new Vector2(horizontal, vertical);

            // normalize input if it exceeds 1 in combined length:
            if (m_Input.sqrMagnitude > 1)
            {
                m_Input.Normalize();
            }

            // handle speed change to give an fov kick
            // only if the player is going to a run, is running and the fovkick is to be used
            if (m_IsWalking != waswalking && m_UseFovKick && m_CharacterController.velocity.sqrMagnitude > 0)
            {
                StopAllCoroutines();
                StartCoroutine(!m_IsWalking ? m_FovKick.FOVKickUp() : m_FovKick.FOVKickDown());
            }
        }


        private void RotateView()
        {
            m_MouseLook.LookRotation (transform, m_Camera.transform);
        }


        private void OnControllerColliderHit(ControllerColliderHit hit)
        {
            Rigidbody body = hit.collider.attachedRigidbody;
            //dont move the rigidbody if the character is on top of it
            if (m_CollisionFlags == CollisionFlags.Below)
            {
                return;
            }

            if (body == null || body.isKinematic)
            {
                return;
            }
            body.AddForceAtPosition(m_CharacterController.velocity*0.1f, hit.point, ForceMode.Impulse);
        }
    }

Now I know that the problem is Private Void on line 44 and that everything I've read is in the wrong place (to be sure, I've changed it in public void, and then I l & # 39; I left empty, both generating errors). am puzzled as to or I should move Private Void too.

I appreciate all the advice on this subject.

Python 3.x – I extract features from wav format audio files using librosa but I fix the error

Traceback (last most recent call):
File "C: Users Lenovo Downloads CODE CODE FEATURE_EXTRACTION.py", line 47, in
y, sr = librosa.load (song name, mono = True, duration = 30)
File "C: Users Lenovo Anaconda3 lib site-packages librosa core audio.py", line 119, loading
with audioread.audio_open (os.path.realpath (path)) as input_file:
"C: Users Lenovo Anaconda3 lib site-packages audioread__init __. Py" file, line 116, in audio_open
raises NoBackendError ()
audioread.exceptions.NoBackendError

error – Magento 2.3.3 Undefined property EmailMessage.php

I am experiencing this problem after upgrading to magento 2.3.3 and applying the email patch provided.
When I try to send an email, I receive:

report.CRITICAL: Notice: Undefined
property: Magento Framework Mail EmailMessage Interceptor :: $ zendMessage
in
/my/folder/public_html/vendor/magento/framework/Mail/EmailMessage.php
at line 66 {"exception": "(object) (Exception (code: 0): Note:
Undefined property:
Magento Framework Mail EmailMessage Interceptor :: $ zendMessage in
/my/folder/public_html/vendor/magento/framework/Mail/EmailMessage.php
on line 66 to
/my/folder/public_html/vendor/magento/framework/App/ErrorHandler.php:61) "}

I spent hours …. Any help would be appreciated

The parent GET theme generates a 500 error in the console, the site is functioning properly

I have a showcase site with a showcase-child theme. Everything works fine except I have 500 annoying in the console.

GET https://fubar.net/wp-content/themes/storefront/?ver=5.3
net::ERR_ABORTED 500

Everything is put in queue correctly. Is it a .htaccess thing?

conditions – condition error if PHP

I make it a condition that if the $ location1 field is complete, execute a function and if the $ location2 field is complete, perform a similar function in the same field.
You do not find the error in the state, can you help me?
thank you very much

add_filter ('bps_hidden_filters', 'directory_filters');
function directory_filters ($filters)
{
    $user = bp_loggedin_user_id ();
    if (empty ($user))  return $filters;

    $filters('bps_directory') = bps_current_page ();

$location1 = xprofile_get_field_data (46, $user ); 
$location2 = xprofile_get_field_data (52, $user ); 


 if (!empty ($location1)){
$filters('field_62') = empty ($_REQUEST('field_62'))? addslashes ($location1): $_REQUEST('field_62');} else if   (!empty ($location2)){
 $filters('field_62') = empty ($_REQUEST('field_62'))? addslashes ($location2): $_REQUEST('field_62');}
}

php – The WC_Customer removal function returns an error

Here is my code:

function woo_delete_customer(){
    $customer = new WC_Customer(get_current_user_id());
  $val =  $customer -> delete();
   if($val){
       $customer -> save();
       $data = ();
       $data('Status') = 'Customer was successfully deleted';
       return new WP_REST_Response( $data, 200 );
   }
   else{
       new WP_Error(
            'woo_deleting_problems',
            'Can't delete customer!',
            array(
                'status' => 403,
            )
        );
   }

}

And here are my journals:

2019-11-16T05:29:23+00:00 CRITICAL Call to undefined function wp_delete_user() in /home/test.com/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store.php on line 235

Help me, please! ((