private $query = ""; –> syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION…

Hello dear MySQL developers, i am mere user and i want to ask you if you can please let me know what is wrong in the file backend/mysql.class.php

I am asking because the script i have uploaded says this:

Line 23 is:…

private $query = ""; –> syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION…

PHP Parse error: Syntax error, expecting ‘}’ – WordPress Snippet | LearnPress

Boa noite pessoal, tudo bem?

Eu criei um Shortcode para LearnPress onde exibe em uma página especifica os cursos do intrutor.

Ao tentar exibir os cursos do aluno, seguindo a mesma logica utilizada com as alterações necessária ele exibe um erro no php.

Eu uso o Plugin PHP Snippet para adicionar meus Snippets, ele aponta que haveria necessidade de uma chave na linha 34. Segue o print.


Porém já rodei o código, contei e recontei, todas chaves abertas estão fechadas, alguém pode me ajudar a solucionar?

// Add Shortcode
        function seus_cursos() {
            defined( 'ABSPATH' ) || exit();

$profile       = learn_press_get_profile();
$filter_status = LP_Request::get_string( 'filter-status' );
$query         = $profile->query_courses( 'purchased', array( 'status' => $filter_status ) );

<div class="learn-press-subtab-content">

    <?php if ( $query('items') ) { ?>
        <table class="lp-list-table profile-list-courses profile-list-table">
                <th class="column-course"><?php _e( 'Course', 'learnpress' ); ?></th>
                <th class="column-date"><?php _e( 'Date', 'learnpress' ); ?></th>
                <th class="column-status"><?php _e( 'Progress', 'learnpress' ); ?></th>
            <?php foreach ( $query('items') as $user_course ) { ?>
                <?php $course = learn_press_get_course( $user_course->get_id() ); ?>
                    <td class="column-course">
                        <a href="<?php echo $course->get_permalink(); ?>">
                            <?php echo $course->get_title(); ?>
                    <td class="column-date"><?php echo $user_course->get_start_time( 'd M Y' ); ?></td>
                    <td class="column-status">
                        <?php if ( $user_course->get_results( 'status' ) !== 'purchased' ) { ?>
                            <span class="result-percent"><?php echo $user_course->get_percent_result(); ?></span>
                            <span class="lp-label label-<?php echo esc_attr( $user_course->get_results( 'status' ) ); ?>">
                                <?php echo $user_course->get_status_label( $user_course->get_results( 'status' ) ); ?>
                        <?php } else { ?>
                            <span class="lp-label label-<?php echo esc_attr( $user_course->get_results( 'status' ) ); ?>">
                                <?php echo $user_course->get_status_label( $user_course->get_results( 'status' ) ); ?>
                        <?php } ?>
            <?php } ?>
            <tr class="list-table-nav">
                <td colspan="2" class="nav-text">
                    <?php echo $query->get_offset_text(); ?>
                <td colspan="2" class="nav-pages">
                    <?php $query->get_nav_numbers( true, $profile->get_current_url() ); ?>
    <?php } else {
        learn_press_display_message( __( 'No courses!', 'learnpress' ) );
    } ?>
add_shortcode( 'cursos_aluno', 'seus_cursos' );

mysql – “ENUM” is not vallid at his position, expecting ‘)’

MySQL (and SQL in general??) is very picky about the order of things1.

province CHAR(2) DEFAULT 'QC' ENUM('QC','ON','NB')


province  ENUM('QC','ON','NB')  DEFAULT 'QC'  -- if you want ENUM

But also, ENUM and CHAR are two different datatypes. So, maybe you wanted this:

province CHAR(2) DEFAULT 'QC'                 -- if you want CHAR

1 – You should try to become comfortable reading syntax diagrams, such as this for the create table statement.

oracle – Scheduling a procedure with DBMS_SCHEDULER. PLS-00103: Encountered the symbol “NULL” when expecting one of the following: ;

I can’t schedule a job to run.

I made a procedure that writes CSV files and it works when I execute it.

Then I tried to make a job to schedule it:

    job_name => 'AUTOMATE_CSV_EXPORT',
    job_type => 'STORED_PROCEDURE',
    job_action => 'EXPORT_ALL_LYS_FOR_TABLEAU',
    number_of_arguments => 0,
    start_date => '20-AUG-20 2.05.00PM',
    repeat_interval => 'FREQ=WEEKLY; BYDAY=FRI; BYHOUR=23;',
    end_date => NULL,
    enabled => FALSE,
    auto_drop => FALSE,
    comments => 'hello i am a comment');

    name => 'AUTOMATE_CSV_EXPORT', 
    attribute => 'logging_level', 
    name => 'AUTOMATE_CSV_EXPORT');

It didn’t run at the scheduled time, but it did when I ran it like this:

enter image description here

I tried to edit the start time in the wizard and it gives me this error:

enter image description here

domain name system – Why don’t I get the TXT records I was expecting?

I’m using Google Domains to manage DNS of a domain I own. In Google Domains, I’ve configured a TXT record _acme-challenge with a specific value. I was expecting to see this value when doing:

dig -t TXT

but instead I get:

; <<>> DiG 9.11.3-... <<>> -t TXT
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19716
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; WARNING: recursion requested but not available

; EDNS: version: 0, flags:; udp: 512
;         IN  TXT

;; AUTHORITY SECTION:      300 IN  SOA 20 21600 3600 259200 300

;; Query time: 16 msec
;; WHEN: Thu Aug 06 22:12:23 CEST 2020
;; MSG SIZE  rcvd: 132

Why don’t I see the TXT record? What am I doing wrong?

sql server – SSRS 2016 – The client found the answer content type & # 39; & # 39 ;, but I was expecting & # 39; text / xml & # 39;

I have SQL Server 2017 Developer installed on my workstation, and I just installed SSRS 2017. I can browse the SSRS portal, upload fictitious data files and create KPIs. However, when I click on "+ New", then on "Data set" or "Data source", the message "Something went wrong. Please try again later". The only track in a log file is in my RSPortal_yyyy_mm_dd …… log file that shows the following:

An OData exception occurred: Microsoft.SqlServer.ReportingServices2010.RSConnection2010 + MissingEndpointException: The connection attempt to the report server failed. Verify your connection information and that the report server is a compatible version. —> System.InvalidOperationException: the client found the answer content type of & # 39; & # 39 ;, but I was expecting & # 39; text / xml & # 39;

I get the same error if I try to load a .rdl file.

I did a "next / next / next" installation of SSRS, keeping the default values. The only unusual thing is that I'm connected to a machine account, not a user account. This machine account is shown in the upper right corner of the SSRS web portal, so it is happening at least.

What could be happening here?

javascript: How to use try-catch when expecting multiple promises without Promise.all?

I need to do something like:

let's promise1 = getPromise1 ();
let's Promise2 = getPromise2 ();
we go to promise3 = getPromise3 ();

// some more code

result1 = expects promise1;
// work with result1 in a specific way

outcome2 = expectation promise2;
// work with result2 in a specific way

result3 = expects promise3;
// work with result3 in a specific way

Since I need to do quite unique things in each of the results, I do not want to work with Promise.all, as it results in an unpleasant structure in case I do not.

My question is – where does it come from? try to catch him () {} block enter its place? Even if one of the mistakes of the promises, I do not want to affect others. They must finish the execution independently. I wrap myself ResultX in try{} or I wrap leave promiseX = ... . Or both?

Do you have a better design pattern in mind?

Thank you!