问:
How do I avoid replicating catched exceptions pop-ups in a C# Windows Form project?
The "Next Page" button has the problem. When I run it, if I click the "Next Page" button, it displays the error, (Highlighted in the catch block), and continues to display the error for the next 5 to 6 times.
Here's my source code for the button:

```<code>private void NextPageButton1_Click(object sender, EventArgs e)
        {
            object[] textSpaces = { this.ReferenceTextBox.Text, this.FirstNameTextBox.Text, this.SurnameTextBox.Text, this.Organisation_name.Text,
            this.Organisation_address.Text, this.OccupationTextBox.Text, this.FileNumberTextBox.Text };

            if (this.NextPage_2_Button.Enabled)
            {
                foreach (var textSpace in textSpaces)
                {

                    if ( string.IsNullOrEmpty((string?)textSpace) || textSpace.Equals(string.Empty) )
                        MessageBox.Show("You should enter valid text in the empty fields!", "WARNING!", MessageBoxButtons.OK, MessageBoxIcon.Warning);

                    else if ( !string.IsNullOrEmpty((string?)textSpace) || !textSpace.Equals(string.Empty) )
                    {
                        var nextPage = new RE_DatabaseCaptureForm_2();
                        try { nextPage.ShowDialog(); }

                        catch (InvalidOperationException)
                        {
                            MessageBox.Show("You entered an invalid value!", "ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                        finally
                        {
                            object _object = new RE_DatabaseCaptureForm_1();
                            lock(_object)
                            {
                                var exitApp = new Thread(() => { Application.Exit(); }); // Closes the executing Windows Form to be able to restart it freshly.
                                exitApp.Start();

                                Thread.Sleep(1500);
                                exitApp.Interrupt(); // Exiting the brief termination of the Windows Form for a fresh restart.

                                // Restarting the Windows form and restarting the pending sign-up page.
                                if (!exitApp.IsAlive)
                                {
                                    Application.Restart();
                                    nextPage.ShowDialog();
                                }
                            }
                        }
                    }
                }
            }
        }
</code>```

enter image description here

I was trying to return the user to the page, if there were unfilled textboxes.

Body:
The "Next Page" button has the problem. When I run it, if I click the "Next Page" button, it displays the error, (Highlighted in the catch block), and continues to display the error for the next 5 to 6 times.
Here's my source code for the button:

private void NextPageButton1_Click(object sender, EventArgs e)
        {
            object[] textSpaces = { this.ReferenceTextBox.Text, this.FirstNameTextBox.Text, this.SurnameTextBox.Text, this.Organisation_name.Text,
            this.Organisation_address.Text, this.OccupationTextBox.Text, this.FileNumberTextBox.Text };

            if (this.NextPage_2_Button.Enabled)
            {
                foreach (var textSpace in textSpaces)
                {

                    if ( string.IsNullOrEmpty((string?)textSpace) || textSpace.Equals(string.Empty) )
                        MessageBox.Show("You should enter valid text in the empty fields!", "WARNING!", MessageBoxButtons.OK, MessageBoxIcon.Warning);

                    else if ( !string.IsNullOrEmpty((string?)textSpace) || !textSpace.Equals(string.Empty) )
                    {
                        var nextPage = new RE_DatabaseCaptureForm_2();
                        try { nextPage.ShowDialog(); }

                        catch (InvalidOperationException)
                        {
                            MessageBox.Show("You entered an invalid value!", "ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                        finally
                        {
                            object _object = new RE_DatabaseCaptureForm_1();
                            lock(_object)
                            {
                                var exitApp = new Thread(() => { Application.Exit(); }); // Closes the executing Windows Form to be able to restart it freshly.
                                exitApp.Start();

                                Thread.Sleep(1500);
                                exitApp.Interrupt(); // Exiting the brief termination of the Windows Form for a fresh restart.

                                // Restarting the Windows form and restarting the pending sign-up page.
                                if (!exitApp.IsAlive)
                                {
                                    Application.Restart();
                                    nextPage.ShowDialog();
                                }
                            }
                        }
                    }
                }
            }
        }

enter image description here

I was trying to return the user to the page, if there were unfilled textboxes.


来源: stackexchange

问:
How to decrement related entity field with query typeorm?
I have a department and an employee entity. When I create an employee for department, departmentEntity.employeesCounter++. But when I need to remove employee by id, I also need to decrement departmentEntity.employeesCount. How can I make it with createBuilderQuery?
`

```<code>@Entity('departments')
export class DepartmentEntity {
    @PrimaryGeneratedColumn()
    id: number;

    @Column({
        type: 'varchar',
    })
    title: string;

    @CreateDateColumn({})
    creationDate: Date;

    @Column({
        type: 'text',
    })
    departmentInfo: string;

    @OneToMany(() => EmployeeEntity, (employee) => employee.departmentId, {
        eager: true,
    })
    @JoinColumn()
    employees: EmployeeEntity[];

    @Column({
      type: 'int',
    })
    employeesCount: number;
</code>```

```<code>
@Entity('employees')
export class EmployeeEntity {
    @PrimaryGeneratedColumn()
    id!: number;

    @Column({
        type: 'varchar',
    })
    firstName: string;

    @Column({
        type: 'varchar',
    })
    surname: string;

    @Column({
        type: 'text',
    })
    post: string;

    @CreateDateColumn()
    creationDate: Date;

    @ManyToOne(() => DepartmentEntity, (department) => department.employees, {
        cascade: true,
    })
    departmentId: DepartmentEntity;
}
</code>```

`

When I create an employee, I know the departmentId that was chosen, but when I remove I can get it only from the repository.

ContentLicense: CC BY-SA 4.0

Body:
I have a department and an employee entity. When I create an employee for department, departmentEntity.employeesCounter++. But when I need to remove employee by id, I also need to decrement departmentEntity.employeesCount. How can I make it with createBuilderQuery?
`

@Entity('departments')
export class DepartmentEntity {
    @PrimaryGeneratedColumn()
    id: number;

    @Column({
        type: 'varchar',
    })
    title: string;

    @CreateDateColumn({})
    creationDate: Date;

    @Column({
        type: 'text',
    })
    departmentInfo: string;

    @OneToMany(() => EmployeeEntity, (employee) => employee.departmentId, {
        eager: true,
    })
    @JoinColumn()
    employees: EmployeeEntity[];

    @Column({
      type: 'int',
    })
    employeesCount: number;

@Entity('employees')
export class EmployeeEntity {
    @PrimaryGeneratedColumn()
    id!: number;

    @Column({
        type: 'varchar',
    })
    firstName: string;

    @Column({
        type: 'varchar',
    })
    surname: string;

    @Column({
        type: 'text',
    })
    post: string;

    @CreateDateColumn()
    creationDate: Date;

    @ManyToOne(() => DepartmentEntity, (department) => department.employees, {
        cascade: true,
    })
    departmentId: DepartmentEntity;
}

`

When I create an employee, I know the departmentId that was chosen, but when I remove I can get it only from the repository.


问:
How to implement onClickListener inside DialogBox which is inside Fragment in android studio?
I want to implement View.onClickListener inside DialogPlus but i dont know how to implement it inside Dialogbox .
I have implemented and overriden onClickListener in ExpenseFragment class and performed fab.setOnClickListener(this) it's working fine.

In the same way i also want to perform someIV.setOnClickListener(this) and perform required action in dialogView which is inside addNote().

Here's my code ....

```<code>public class ExpenseFragment extends Fragment implements View.OnClickListener {
    private TextView totalExpenseTV;
    private FloatingActionButton fab;
    private RecyclerView recyclerView;
    private ImageView filterIcon;
    private PieChart pieChart;

    private Animation rotateForward, rotateBackward;

    private FirebaseRecyclerOptions<ExpenseModel> options;
    private MyAdapter adapter;

    private int calendarImgClick = 0;

    public void onViewCreated(@NonNull View attachInParentView, Bundle savedInstanceState) {
        super.onViewCreated(attachInParentView, savedInstanceState);
        findViewByIDS(attachInParentView);
        setupRecyclerView();
        fabAnimation();
        fab.setOnClickListener(this);

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_expense, container, false);
    }

    private void fabAnimation() {
        rotateForward = AnimationUtils.loadAnimation(getActivity(), R.anim.rotate_forward);
        rotateBackward = AnimationUtils.loadAnimation(getActivity(), R.anim.rotate_backward);
        rotateBackward.setDuration(300);
        rotateForward.setDuration(300);
    }

    @Override
    public void onClick(View view) {
        fab.startAnimation(rotateForward);
        rotateForward.setAnimationListener(new Animation.AnimationListener() {
            @Override
            public void onAnimationStart(Animation animation) {

            }

            @Override
            public void onAnimationEnd(Animation animation) {
                addNote();
            }

            @Override
            public void onAnimationRepeat(Animation animation) {

            }
        });
    }

    private void addNote() {
        if (getActivity() != null) {
            DialogPlus dialog = DialogPlus.newDialog(getActivity())
                    .setContentHolder(new ViewHolder(R.layout.add_expense_layout))
                    .setExpanded(false)
                    .setOnDismissListener(new OnDismissListener() {
                        @Override
                        public void onDismiss(DialogPlus dialog) {
                            fab.startAnimation(rotateBackward);
                        }
                    })
                    .create();

            View myView = dialog.getHolderView();
            TextView expense_date = myView.findViewById(R.id.expense_date);
            EditText expense_title = myView.findViewById(R.id.expense_title);
            EditText expense_amount = myView.findViewById(R.id.expense_amount);
            Button add_note_button = myView.findViewById(R.id.add_note_btn);
            ImageView calendarImg = myView.findViewById(R.id.add_calendar);
            CalendarView calendarView = myView.findViewById(R.id.calenderView);
            LinearLayout linearLayout = myView.findViewById(R.id.linearCalenderLayout);

            ImageView grocery = myView.findViewById(R.id.grocery);
            ImageView bike = myView.findViewById(R.id.bike);
            ImageView rent= myView.findViewById(R.id.rent);
            ImageView foods = myView.findViewById(R.id.foods);
            ImageView beer= myView.findViewById(R.id.beer);
            LinearLayout categoryIconsLayout = myView.findViewById(R.id.categoryIconsLayout);
            TextView selectCategory_heading = myView.findViewById(R.id.selectCategory_heading);

            calendarImg.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    setCalendarVisibility(linearLayout, selectCategory_heading, categoryIconsLayout);
                }
            });

            dialog.show();
        }
    }

    private void setCalendarVisibility(LinearLayout setCalendarVisible, TextView setSelectCateVisible, LinearLayout iconsLayoutVisible) {
        calendarImgClick++;
        if (calendarImgClick >= 2) {
            setCalendarVisible.setVisibility(View.GONE);
            setSelectCateVisible.setVisibility(View.VISIBLE);
            iconsLayoutVisible.setVisibility(View.VISIBLE);
            calendarImgClick = 0;
        } else {
            setCalendarVisible.setVisibility(View.VISIBLE);
            setSelectCateVisible.setVisibility(View.GONE);
            iconsLayoutVisible.setVisibility(View.GONE);

        }

    }

    private void animateCalendarView(LinearLayout ll, CalendarView cv) {
        ll.animate().rotationBy(-180f).setDuration(500);
        cv.animate().rotationBy(180f).setDuration(400);

    }

    private void findViewByIDS(View v) {
        totalExpenseTV = v.findViewById(R.id.totalRsTitle);
        fab = v.findViewById(R.id.fab);
        recyclerView = v.findViewById(R.id.recyclerView);
        filterIcon = v.findViewById(R.id.filterIcon);
        pieChart = v.findViewById(R.id.pieChartHis);

    }

    private void setupRecyclerView() {
        LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
        recyclerView.setLayoutManager(layoutManager);
        recyclerView.setItemAnimator(null);
        if (getActivity() != null) {
            Query query = FirebaseReference.expenseReference(getActivity())
                    .orderByChild("milli");
            options = new FirebaseRecyclerOptions.Builder<ExpenseModel>()
                    .setQuery(query, ExpenseModel.class)
                    .build();

            adapter = new MyAdapter(options, getActivity());
            recyclerView.setAdapter(adapter);
        }
    }

    // OS operations starts here . . . . . . .
    @Override
    public void onStart() {
        super.onStart();
        adapter.startListening();
    }

    @Override
    public void onStop() {
        super.onStop();
        adapter.stopListening();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        adapter.stopListening();
    }

}
</code>```

Body:
I want to implement View.onClickListener inside DialogPlus but i dont know how to implement it inside Dialogbox .
I have implemented and overriden onClickListener in ExpenseFragment class and performed fab.setOnClickListener(this) it's working fine.

In the same way i also want to perform someIV.setOnClickListener(this) and perform required action in dialogView which is inside addNote().

Here's my code ....

public class ExpenseFragment extends Fragment implements View.OnClickListener {
    private TextView totalExpenseTV;
    private FloatingActionButton fab;
    private RecyclerView recyclerView;
    private ImageView filterIcon;
    private PieChart pieChart;

    private Animation rotateForward, rotateBackward;

    private FirebaseRecyclerOptions<ExpenseModel> options;
    private MyAdapter adapter;

    private int calendarImgClick = 0;

    public void onViewCreated(@NonNull View attachInParentView, Bundle savedInstanceState) {
        super.onViewCreated(attachInParentView, savedInstanceState);
        findViewByIDS(attachInParentView);
        setupRecyclerView();
        fabAnimation();
        fab.setOnClickListener(this);

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_expense, container, false);
    }

    private void fabAnimation() {
        rotateForward = AnimationUtils.loadAnimation(getActivity(), R.anim.rotate_forward);
        rotateBackward = AnimationUtils.loadAnimation(getActivity(), R.anim.rotate_backward);
        rotateBackward.setDuration(300);
        rotateForward.setDuration(300);
    }

    @Override
    public void onClick(View view) {
        fab.startAnimation(rotateForward);
        rotateForward.setAnimationListener(new Animation.AnimationListener() {
            @Override
            public void onAnimationStart(Animation animation) {

            }

            @Override
            public void onAnimationEnd(Animation animation) {
                addNote();
            }

            @Override
            public void onAnimationRepeat(Animation animation) {

            }
        });
    }

    private void addNote() {
        if (getActivity() != null) {
            DialogPlus dialog = DialogPlus.newDialog(getActivity())
                    .setContentHolder(new ViewHolder(R.layout.add_expense_layout))
                    .setExpanded(false)
                    .setOnDismissListener(new OnDismissListener() {
                        @Override
                        public void onDismiss(DialogPlus dialog) {
                            fab.startAnimation(rotateBackward);
                        }
                    })
                    .create();

            View myView = dialog.getHolderView();
            TextView expense_date = myView.findViewById(R.id.expense_date);
            EditText expense_title = myView.findViewById(R.id.expense_title);
            EditText expense_amount = myView.findViewById(R.id.expense_amount);
            Button add_note_button = myView.findViewById(R.id.add_note_btn);
            ImageView calendarImg = myView.findViewById(R.id.add_calendar);
            CalendarView calendarView = myView.findViewById(R.id.calenderView);
            LinearLayout linearLayout = myView.findViewById(R.id.linearCalenderLayout);

            ImageView grocery = myView.findViewById(R.id.grocery);
            ImageView bike = myView.findViewById(R.id.bike);
            ImageView rent= myView.findViewById(R.id.rent);
            ImageView foods = myView.findViewById(R.id.foods);
            ImageView beer= myView.findViewById(R.id.beer);
            LinearLayout categoryIconsLayout = myView.findViewById(R.id.categoryIconsLayout);
            TextView selectCategory_heading = myView.findViewById(R.id.selectCategory_heading);

            calendarImg.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    setCalendarVisibility(linearLayout, selectCategory_heading, categoryIconsLayout);
                }
            });

            dialog.show();
        }
    }

    private void setCalendarVisibility(LinearLayout setCalendarVisible, TextView setSelectCateVisible, LinearLayout iconsLayoutVisible) {
        calendarImgClick++;
        if (calendarImgClick >= 2) {
            setCalendarVisible.setVisibility(View.GONE);
            setSelectCateVisible.setVisibility(View.VISIBLE);
            iconsLayoutVisible.setVisibility(View.VISIBLE);
            calendarImgClick = 0;
        } else {
            setCalendarVisible.setVisibility(View.VISIBLE);
            setSelectCateVisible.setVisibility(View.GONE);
            iconsLayoutVisible.setVisibility(View.GONE);

        }

    }

    private void animateCalendarView(LinearLayout ll, CalendarView cv) {
        ll.animate().rotationBy(-180f).setDuration(500);
        cv.animate().rotationBy(180f).setDuration(400);

    }

    private void findViewByIDS(View v) {
        totalExpenseTV = v.findViewById(R.id.totalRsTitle);
        fab = v.findViewById(R.id.fab);
        recyclerView = v.findViewById(R.id.recyclerView);
        filterIcon = v.findViewById(R.id.filterIcon);
        pieChart = v.findViewById(R.id.pieChartHis);

    }

    private void setupRecyclerView() {
        LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
        recyclerView.setLayoutManager(layoutManager);
        recyclerView.setItemAnimator(null);
        if (getActivity() != null) {
            Query query = FirebaseReference.expenseReference(getActivity())
                    .orderByChild("milli");
            options = new FirebaseRecyclerOptions.Builder<ExpenseModel>()
                    .setQuery(query, ExpenseModel.class)
                    .build();

            adapter = new MyAdapter(options, getActivity());
            recyclerView.setAdapter(adapter);
        }
    }

    // OS operations starts here . . . . . . .
    @Override
    public void onStart() {
        super.onStart();
        adapter.startListening();
    }

    @Override
    public void onStop() {
        super.onStop();
        adapter.stopListening();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        adapter.stopListening();
    }

}


问:
Access geometry shaders on WSL2 Ubuntu 22.04 LTS?
I would like to use geometry shaders. But it seems they are not available on WSL2. How can I check, or enable them ?

However, I can read this in glxinfo:

```<code>OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
    GL_ANGLE_pack_reverse_row_order, GL_ANGLE_texture_compression_dxt3,
    GL_ANGLE_texture_compression_dxt5, GL_APPLE_texture_max_level,
    GL_EXT_EGL_image_storage, GL_EXT_base_instance,
    GL_EXT_blend_func_extended, GL_EXT_blend_minmax,
    GL_EXT_color_buffer_float, GL_EXT_compressed_ETC1_RGB8_sub_texture,
    GL_EXT_depth_clamp, GL_EXT_discard_framebuffer,
    GL_EXT_disjoint_timer_query, GL_EXT_draw_buffers,
    GL_EXT_draw_buffers_indexed, GL_EXT_draw_elements_base_vertex,
    GL_EXT_draw_instanced, GL_EXT_float_blend, GL_EXT_frag_depth,
    GL_EXT_geometry_point_size, GL_EXT_geometry_shader,  <---------- HERE
</code>```

My configuration is:

```<code>C:\> wsl --version
WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.963

C:\> systeminfo

OS Name:                   Microsoft Windows 11 Education
OS Version:                10.0.22621 N/A Build 22621
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free

$ glxinfo | head -n100
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,
    GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_libglvnd, GLX_EXT_no_config_context,
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_MESA_copy_sub_buffer, GLX_OML_swap_method, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
    GLX_SGI_make_current_read
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,
    GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
    GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample,
    GLX_ATI_pixel_format_float, GLX_EXT_buffer_age,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_no_config_context, GLX_EXT_swap_control,
    GLX_EXT_swap_control_tear, GLX_EXT_texture_from_pixmap,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_INTEL_swap_event,
    GLX_MESA_copy_sub_buffer, GLX_MESA_multithread_makecurrent,
    GLX_MESA_query_renderer, GLX_MESA_swap_control, GLX_NV_float_buffer,
    GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,
    GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB,
    GLX_ARB_get_proc_address, GLX_ARB_multisample,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_no_config_context,
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer, GLX_OML_swap_method,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce GTX 1060 6GB) (0xffffffff)
    Version: 22.0.5
    Accelerated: yes
    Video memory: 71522MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce GTX 1060 6GB)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.0.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
    GL_AMD_conservative_depth, GL_AMD_draw_buffers_blend,
    GL_AMD_multi_draw_indirect, GL_AMD_shader_trinary_minmax,
    GL_AMD_texture_texture4, GL_ANGLE_texture_compression_dxt3,
    GL_ANGLE_texture_compression_dxt5, GL_ARB_ES2_compatibility,
    GL_ARB_ES3_1_compatibility, GL_ARB_ES3_compatibility,
    GL_ARB_arrays_of_arrays, GL_ARB_base_instance, GL_ARB_blend_func_extended,
    GL_ARB_clear_buffer_object, GL_ARB_compressed_texture_pixel_storage,
    GL_ARB_compute_shader, GL_ARB_compute_variable_group_size,
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
    GL_ARB_copy_buffer, GL_ARB_debug_output, GL_ARB_depth_buffer_float,
    GL_ARB_depth_clamp, GL_ARB_direct_state_access, GL_ARB_draw_buffers,
    GL_ARB_draw_buffers_blend, GL_ARB_draw_elements_base_vertex,
    GL_ARB_draw_indirect, GL_ARB_draw_instanced,
    GL_ARB_explicit_attrib_location, GL_ARB_explicit_uniform_location,
    GL_ARB_fragment_coord_conventions, GL_ARB_fragment_shader,
    GL_ARB_framebuffer_no_attachments, GL_ARB_framebuffer_object,
    GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary,
    GL_ARB_get_texture_sub_image, GL_ARB_gpu_shader5, GL_ARB_half_float_pixel,
    GL_ARB_half_float_vertex, GL_ARB_indirect_parameters,
    GL_ARB_instanced_arrays, GL_ARB_internalformat_query,
    GL_ARB_internalformat_query2, GL_ARB_invalidate_subdata,
    GL_ARB_map_buffer_alignment, GL_ARB_map_buffer_range, GL_ARB_multi_bind,
    GL_ARB_multi_draw_indirect, GL_ARB_occlusion_query2,
    GL_ARB_parallel_shader_compile, GL_ARB_pixel_buffer_object,
    GL_ARB_point_sprite, GL_ARB_program_interface_query,
    GL_ARB_provoking_vertex, GL_ARB_robustness, GL_ARB_sample_shading,
    GL_ARB_sampler_objects, GL_ARB_seamless_cube_map,
    GL_ARB_separate_shader_objects, GL_ARB_shader_atomic_counter_ops,
    GL_ARB_shader_atomic_counters, GL_ARB_shader_bit_encoding,
    GL_ARB_shader_draw_parameters, GL_ARB_shader_image_load_store,
    GL_ARB_shader_image_size, GL_ARB_shader_objects,
    GL_ARB_shader_storage_buffer_object, GL_ARB_shader_subroutine,
    GL_ARB_shader_texture_lod, GL_ARB_shading_language_420pack,
    GL_ARB_shading_language_include, GL_ARB_shading_language_packing,
</code>```

Body:
I would like to use geometry shaders. But it seems they are not available on WSL2. How can I check, or enable them ?

However, I can read this in glxinfo:

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
    GL_ANGLE_pack_reverse_row_order, GL_ANGLE_texture_compression_dxt3,
    GL_ANGLE_texture_compression_dxt5, GL_APPLE_texture_max_level,
    GL_EXT_EGL_image_storage, GL_EXT_base_instance,
    GL_EXT_blend_func_extended, GL_EXT_blend_minmax,
    GL_EXT_color_buffer_float, GL_EXT_compressed_ETC1_RGB8_sub_texture,
    GL_EXT_depth_clamp, GL_EXT_discard_framebuffer,
    GL_EXT_disjoint_timer_query, GL_EXT_draw_buffers,
    GL_EXT_draw_buffers_indexed, GL_EXT_draw_elements_base_vertex,
    GL_EXT_draw_instanced, GL_EXT_float_blend, GL_EXT_frag_depth,
    GL_EXT_geometry_point_size, GL_EXT_geometry_shader,  <---------- HERE

My configuration is:

C:\> wsl --version
WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.963

C:\> systeminfo

OS Name:                   Microsoft Windows 11 Education
OS Version:                10.0.22621 N/A Build 22621
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free

$ glxinfo | head -n100
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,
    GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_libglvnd, GLX_EXT_no_config_context,
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_MESA_copy_sub_buffer, GLX_OML_swap_method, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
    GLX_SGI_make_current_read
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,
    GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
    GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample,
    GLX_ATI_pixel_format_float, GLX_EXT_buffer_age,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_no_config_context, GLX_EXT_swap_control,
    GLX_EXT_swap_control_tear, GLX_EXT_texture_from_pixmap,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_INTEL_swap_event,
    GLX_MESA_copy_sub_buffer, GLX_MESA_multithread_makecurrent,
    GLX_MESA_query_renderer, GLX_MESA_swap_control, GLX_NV_float_buffer,
    GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,
    GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB,
    GLX_ARB_get_proc_address, GLX_ARB_multisample,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_no_config_context,
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer, GLX_OML_swap_method,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce GTX 1060 6GB) (0xffffffff)
    Version: 22.0.5
    Accelerated: yes
    Video memory: 71522MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce GTX 1060 6GB)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.0.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
    GL_AMD_conservative_depth, GL_AMD_draw_buffers_blend,
    GL_AMD_multi_draw_indirect, GL_AMD_shader_trinary_minmax,
    GL_AMD_texture_texture4, GL_ANGLE_texture_compression_dxt3,
    GL_ANGLE_texture_compression_dxt5, GL_ARB_ES2_compatibility,
    GL_ARB_ES3_1_compatibility, GL_ARB_ES3_compatibility,
    GL_ARB_arrays_of_arrays, GL_ARB_base_instance, GL_ARB_blend_func_extended,
    GL_ARB_clear_buffer_object, GL_ARB_compressed_texture_pixel_storage,
    GL_ARB_compute_shader, GL_ARB_compute_variable_group_size,
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
    GL_ARB_copy_buffer, GL_ARB_debug_output, GL_ARB_depth_buffer_float,
    GL_ARB_depth_clamp, GL_ARB_direct_state_access, GL_ARB_draw_buffers,
    GL_ARB_draw_buffers_blend, GL_ARB_draw_elements_base_vertex,
    GL_ARB_draw_indirect, GL_ARB_draw_instanced,
    GL_ARB_explicit_attrib_location, GL_ARB_explicit_uniform_location,
    GL_ARB_fragment_coord_conventions, GL_ARB_fragment_shader,
    GL_ARB_framebuffer_no_attachments, GL_ARB_framebuffer_object,
    GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary,
    GL_ARB_get_texture_sub_image, GL_ARB_gpu_shader5, GL_ARB_half_float_pixel,
    GL_ARB_half_float_vertex, GL_ARB_indirect_parameters,
    GL_ARB_instanced_arrays, GL_ARB_internalformat_query,
    GL_ARB_internalformat_query2, GL_ARB_invalidate_subdata,
    GL_ARB_map_buffer_alignment, GL_ARB_map_buffer_range, GL_ARB_multi_bind,
    GL_ARB_multi_draw_indirect, GL_ARB_occlusion_query2,
    GL_ARB_parallel_shader_compile, GL_ARB_pixel_buffer_object,
    GL_ARB_point_sprite, GL_ARB_program_interface_query,
    GL_ARB_provoking_vertex, GL_ARB_robustness, GL_ARB_sample_shading,
    GL_ARB_sampler_objects, GL_ARB_seamless_cube_map,
    GL_ARB_separate_shader_objects, GL_ARB_shader_atomic_counter_ops,
    GL_ARB_shader_atomic_counters, GL_ARB_shader_bit_encoding,
    GL_ARB_shader_draw_parameters, GL_ARB_shader_image_load_store,
    GL_ARB_shader_image_size, GL_ARB_shader_objects,
    GL_ARB_shader_storage_buffer_object, GL_ARB_shader_subroutine,
    GL_ARB_shader_texture_lod, GL_ARB_shading_language_420pack,
    GL_ARB_shading_language_include, GL_ARB_shading_language_packing,


Title: json.dumps cant decode string with hex values in python

Body:
i am trying to parse youtube data with requests, the json data is stored in the script tag,
almost every time, what my code does is remove the variable part till the "{" character and cut off the ending part so that i get a json string, which i convert into python object with json.dumps()

but in out 1 of 30 the json script has its "{", "}", "," and ":" in hex value,
which json.dumps is unable to parse and i get the following error:

Expecting value: line 1 column 1 (char 0)

as the hexed json string is large i cant share but heres is a short chunk:

var ytInitialData = '\x7b\x22responseContext\x22:\x7b\x22serviceTrackingParams\x22:\x5b\x7b\x22service\x22:\x22GFEEDBACK\x22,\x22params\x22:\x5b\x7b\x22key\x22:\x22has_unlimited_entitlement\x22,\x22value\x22:\x22False\x22\x7d,\x7b\x22key\x22:\x22has_premium_lite_entitlement\x22,\x22value\x22:\x22False\x22\x7d,\x7b\x22key\x22:\x22logged_in\x22,\x22value\x22:\x220\x22\x7d,\x7b\x22key\x22:\x22country-type\x22,\x22value\x22:\x22B\x22\x7d,\x7b\x22key\x22:\x22e\x22,\x22value\x22:\x221714240,23804281,23882502,23918597,23934970,23946420,23966208,23983296,23998056,24001373,24002022,24002025,24004644,24007246,24034168,24036947,24077241,24080738,24120820,24135310,24140247,24161116,24162919,24164186,24166867,24169501,24181174,24187043,24187377,24197450,24211178,24217535,24219713,24241378,24248091,24255163,24255543,24255545,24262346,24263796,24267564,24268142,24276555,24279196,24283015,24283093,24288043,24288346,24288664,24290971,24292955,24298326,24299875,24390013,24390675,24391539,24392364,24392405,24392524,24394395,24396647,24402891,24404640,24406316,24406621,24410275,24415864,24415866,24416290,24416354,24418790,24419276,24421154,24422003,24424028,24427072,24428900,24431193,24431335,24431909,24433348,24434665,24436008,24436527,24438684,24439229,24441244,24590921,24591046,24612269,24613467,24613789,24614043,24615089,24615363,24615479,24615619,24615664,39322504,39322574\x22\x7d\x5d\x7d,\x7b\x22service\x22:\x22CSI\x22,\x22params\x22:\x5b\x7b\x22key\x22:\x22yt_ad\x22,\x22value\x22:\x221\x22\x7d,\x7b\x22key\x22:\x22c\x22,\x22value\x22:\x22MWEB\x22\x7d,\x7b\x22key\x22:\x22cver\x22,\x22value\x22:\x222.20221216.00.00\x22\x7d,\x7b\x22key\x22:\x22yt_li\x22,\x22value\x22:\x220\x22\x7d,\x7b\x22key\x22:\x22GetSearch_rid\x22,"

and usually i get this string which is parsable by json:

var ytInitialData = '{"responseContext":{"serviceTrackingParams":[{"service":"GUIDED_HELP","params":[{"key":"context","value":"yt_web_search"},{"key":"logged_in","value":"0"}]},{"service":"GFEEDBACK","params":[{"key":"has_unlimited_entitlement","value":"False"},{"key":"has_premium_lite_entitlement","value":"False"},{"key":"logged_in","value":"0"},{"key":"country-type","value":"B"},{"key":"e","value":"1714247,23804281,23882685,23918597,23934970,23946420,23966208,23983296,23986025,23998056,24001373,24002022,24002025,24004644,24007246,24034168,24036948,24077241,24080738,24120820,24135310,24140247,24161116,24162920,24164186,24166867,24169501,24181174,24186125,24187043,24187377,24197450,24211178,24217535,24219713,24241378,24248091,24248956,24255165,24255543,24255545,24262346,24263796,24267564,24268142,24270990,24279196,24283015,24283093,24283493,24288045,24288486,24288664,24290971,24291857,24292955,24296352,24298324,24390675,24391537,24392364,24392399,24392450,24396645,24397913,24398983,24402891,24404640,24406313,24406621,24406859,24406860,24414074,24415864,24415866,24416354,24416707,24419347,24421894,24424574,24425332,24425898,24428902,24432282,24433679,24434659,24434665,24436009,24441244,24441300,24590921,24591046,24612269,24613467,24613789,24614043,24615089,24615363,24615479,24615557,24615619,24615664,39322504,39322574"}]},{"service":"CSI","params":[{"key":"yt_ad","value":"1"},{"key":"c","value":"WEB"},{"key":"cver","value":"2.20221215.04.01"},{"key":"yt_li","value":"0"},{"key":"GetSearch_rid",

i have tried this:

data = open('err.txt', 'r', encoding='utf-8').read() # json string with hex values
print(type(data))

byte_s = bytes.fromhex(data)
data = byte_s.decode("utf-8")
print(data)

but it results in error:

ValueError: non-hexadecimal number found in fromhex() arg at position 4440'


问:
OpenAPI - Removing Properties
I have a few schema components that I want to reuse for request bodies, but there are some properties from the schema that I want removed (ID, Created, Modified, etc...)

```<code>components:
  requestBodies:
    CreateAddress:
      content:
        application/json:
          schema:
            street:
              type: string
              example: 123 Main St.
            suite:
              type: string
              example: 1001
            city:
              type: string
              example: Cityville
            # ... and so on ...

  schemas:
    Address:
      type: object
      allOf:
        - $ref: '#/components/schemas/Entity'
        - type: object
          properties:
            street:
              type: string
              example: 123 Main St.
            suite:
              type: string
              example: 1001
            city:
              type: string
              example: Cityville
            # ... and so on ...
    Entity:
      type: object
      description: The base part of all schemas.

      # For the sake of documentation, I am only showing the address. My OpenAPI spec has other schemas that uses Entity as its base.

      properties:
        id:
          type: string
          description: The UUID of the entity.
          example: 56d13e3c-41c1-4385-ab39-42eedfcafce7
        created:
          type: string
          description: The date and time when the entity was created.
          example: 1970-01-01_00:00:00
        modified:
          type: string
          description: The date and time when the entity was modified.
          example: 1970-01-01_00:00:00
        # ... and so on ...
</code>```

How do I go about doing the request body w/o having to repeat documentation "code" and it does not contain any of the properties from the parent Entity schema.

Title: OpenAPI - Removing Properties

Body:
I have a few schema components that I want to reuse for request bodies, but there are some properties from the schema that I want removed (ID, Created, Modified, etc...)

components:
  requestBodies:
    CreateAddress:
      content:
        application/json:
          schema:
            street:
              type: string
              example: 123 Main St.
            suite:
              type: string
              example: 1001
            city:
              type: string
              example: Cityville
            # ... and so on ...

  schemas:
    Address:
      type: object
      allOf:
        - $ref: '#/components/schemas/Entity'
        - type: object
          properties:
            street:
              type: string
              example: 123 Main St.
            suite:
              type: string
              example: 1001
            city:
              type: string
              example: Cityville
            # ... and so on ...
    Entity:
      type: object
      description: The base part of all schemas.

      # For the sake of documentation, I am only showing the address. My OpenAPI spec has other schemas that uses Entity as its base.

      properties:
        id:
          type: string
          description: The UUID of the entity.
          example: 56d13e3c-41c1-4385-ab39-42eedfcafce7
        created:
          type: string
          description: The date and time when the entity was created.
          example: 1970-01-01_00:00:00
        modified:
          type: string
          description: The date and time when the entity was modified.
          example: 1970-01-01_00:00:00
        # ... and so on ...

How do I go about doing the request body w/o having to repeat documentation "code" and it does not contain any of the properties from the parent Entity schema.


问:
Error linking SDL3 project undefined reference to `__imp_glCreateShader'
I have simple project for tests. But I can't build the project successfully with MinGW64.
The project consists of CMakeLists.txt and main.cpp

CMakeLists.txt

```<code>cmake_minimum_required(VERSION 3.20)

set(PROJECT "GLTest")

set(THIRD_PARTY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rd-party")

set(glm_INSTALL_DIR ${THIRD_PARTY_DIR}/glm)
set(sdl3_INSTALL_DIR ${THIRD_PARTY_DIR}/sdl3)

if (${PREBUILD_SOLUTION})
    project(THIRD_PARTY NONE)

    include(${THIRD_PARTY_DIR}/cmake/glm.cmake)
    include(${THIRD_PARTY_DIR}/cmake/sdl3.cmake)

    return()
else()
    project(${PROJECT})
endif()

enable_language(C)
enable_language(CXX)
enable_language(ASM_NASM)
set(CMAKE_ASM_NASM_OBJECT_FORMAT  win64)
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <INCLUDES> \
<FLAGS> -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_EXTENSIONS off)
set(CMAKE_CXX_STANDARD_REQUIRED on)

if(MSVC)
  #add_compile_options(/W4 /WX)
else()
  #add_compile_options(-Wall -Wextra -Wpedantic )#-Werror)
endif()

set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DGLTEST_DEBUG")

list(APPEND CMAKE_PREFIX_PATH "${THIRD_PARTY_DIR}/sdl3")

find_package(SDL3 REQUIRED SDL3)
find_package(OpenGL 4 REQUIRED OpenGL)

add_executable(${PROJECT} main.cpp)

target_include_directories(${PROJECT} PRIVATE
        ${SDL3_INCLUDE_DIR}
)

target_link_libraries(${PROJECT} PRIVATE
        SDL3::SDL3-static
        OpenGL::GL
        OpenGL::GLU
)

</code>```

main.cpp

#include <iostream>

#define GL_GLEXT_PROTOTYPES
#include <SDL3/SDL.h>
#include <SDL3/SDL_opengl.h>

typedef float t_mat4x4[16];

static inline void mat4x4_ortho( t_mat4x4 out, float left, float right, float bottom, float top, float znear, float zfar )
{
    #define T(a, b) (a * 4 + b)

    out[T(0,0)] = 2.0f / (right - left);
    out[T(0,1)] = 0.0f;
    out[T(0,2)] = 0.0f;
    out[T(0,3)] = 0.0f;

    out[T(1,1)] = 2.0f / (top - bottom);
    out[T(1,0)] = 0.0f;
    out[T(1,2)] = 0.0f;
    out[T(1,3)] = 0.0f;

    out[T(2,2)] = -2.0f / (zfar - znear);
    out[T(2,0)] = 0.0f;
    out[T(2,1)] = 0.0f;
    out[T(2,3)] = 0.0f;

    out[T(3,0)] = -(right + left) / (right - left);
    out[T(3,1)] = -(top + bottom) / (top - bottom);
    out[T(3,2)] = -(zfar + znear) / (zfar - znear);
    out[T(3,3)] = 1.0f;

    #undef T
}

static const char * vertex_shader =
    "#version 130\n"
    "in vec2 i_position;\n"
    "in vec4 i_color;\n"
    "out vec4 v_color;\n"
    "uniform mat4 u_projection_matrix;\n"
    "void main() {\n"
    "    v_color = i_color;\n"
    "    gl_Position = u_projection_matrix * vec4( i_position, 0.0, 1.0 );\n"
    "}\n";

static const char * fragment_shader =
    "#version 130\n"
    "in vec4 v_color;\n"
    "out vec4 o_color;\n"
    "void main() {\n"
    "    o_color = v_color;\n"
    "}\n";

typedef enum t_attrib_id
{
    attrib_position,
    attrib_color
} t_attrib_id;

int main( int argc, char * argv[] )
{
    SDL_Init( SDL_INIT_VIDEO );
    SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
    SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );
    SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 );
    SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );
    SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );
    SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 8 );

    SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION, 4 );
    SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION, 5 );
    SDL_GL_SetAttribute( SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE );

    static const int width = 800;
    static const int height = 600;

    SDL_Window * window = SDL_CreateWindow( "", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN );
    SDL_GLContext context = SDL_GL_CreateContext( window );

    GLuint vs, fs, program;

    vs = glCreateShader( GL_VERTEX_SHADER );
    fs = glCreateShader( GL_FRAGMENT_SHADER );

    int length = strlen( vertex_shader );
    glShaderSource( vs, 1, ( const GLchar ** )&vertex_shader, &length );
    glCompileShader( vs );

    GLint status;
    glGetShaderiv( vs, GL_COMPILE_STATUS, &status );
    if( status == GL_FALSE )
    {
        fprintf( stderr, "vertex shader compilation failed\n" );
        return 1;
    }

    length = strlen( fragment_shader );
    glShaderSource( fs, 1, ( const GLchar ** )&fragment_shader, &length );
    glCompileShader( fs );

    glGetShaderiv( fs, GL_COMPILE_STATUS, &status );
    if( status == GL_FALSE )
    {
        fprintf( stderr, "fragment shader compilation failed\n" );
        return 1;
    }

    program = glCreateProgram();
    glAttachShader( program, vs );
    glAttachShader( program, fs );

    glBindAttribLocation( program, attrib_position, "i_position" );
    glBindAttribLocation( program, attrib_color, "i_color" );
    glLinkProgram( program );

    glUseProgram( program );

    glDisable( GL_DEPTH_TEST );
    glClearColor( 0.5, 0.0, 0.0, 0.0 );
    glViewport( 0, 0, width, height );

    GLuint vao, vbo;

    glGenVertexArrays( 1, &vao );
    glGenBuffers( 1, &vbo );
    glBindVertexArray( vao );
    glBindBuffer( GL_ARRAY_BUFFER, vbo );

    glEnableVertexAttribArray( attrib_position );
    glEnableVertexAttribArray( attrib_color );

    glVertexAttribPointer( attrib_color, 4, GL_FLOAT, GL_FALSE, sizeof( float ) * 6, 0 );
    glVertexAttribPointer( attrib_position, 2, GL_FLOAT, GL_FALSE, sizeof( float ) * 6, ( void * )(4 * sizeof(float)) );

    const GLfloat g_vertex_buffer_data[] = {
    /*  R, G, B, A, X, Y  */
        1, 0, 0, 1, 0, 0,
        0, 1, 0, 1, width, 0,
        0, 0, 1, 1, width, height,

        1, 0, 0, 1, 0, 0,
        0, 0, 1, 1, width, height,
        1, 1, 1, 1, 0, height
    };

    glBufferData( GL_ARRAY_BUFFER, sizeof( g_vertex_buffer_data ), g_vertex_buffer_data, GL_STATIC_DRAW );

    t_mat4x4 projection_matrix;
    mat4x4_ortho( projection_matrix, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 100.0f );
    glUniformMatrix4fv( glGetUniformLocation( program, "u_projection_matrix" ), 1, GL_FALSE, projection_matrix );

    for( ;; )
    {
        glClear( GL_COLOR_BUFFER_BIT );

        SDL_Event event;
        while( SDL_PollEvent( &event ) )
        {
            switch( event.type )
            {
                case SDL_KEYUP:
                    if( event.key.keysym.sym == SDLK_ESCAPE )
                        return 0;
                    break;
            }
        }

        glBindVertexArray( vao );
        glDrawArrays( GL_TRIANGLES, 0, 6 );

        SDL_GL_SwapWindow( window );
        SDL_Delay( 1 );
    }

    SDL_GL_DeleteContext( context );
    SDL_DestroyWindow( window );
    SDL_Quit();

    return 0;
}

```
<p>But when I try to build a project, I get a linking error <code>undefined reference to __imp_glCreateShader"</code>. I've looked all over the Internet. But I have not found an answer to my question. Maybe someone has faced a similar problem?</p>
<hr />
<p>UPD:</p>
<p>Build command</p>
<pre class="lang-none prettyprint-override"><code>[build] cmd.exe /C "cd . && F:\msys64\mingw64\bin\g++.exe -g -DGLTEST_DEBUG  CMakeFiles/GLTest.dir/main.cpp.obj -o GLTest.exe -Wl,--out-implib,libGLTest.dll.a -Wl,--major-image-version,0,--minor-image-version,0  ../3rd-party/sdl3/lib/libSDL3.dll.a  -lopengl32  -lglu32  -lopengl32  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
</code>```

Error message

[build] cmd.exe /C "cd . && F:\msys64\mingw64\bin\g++.exe -g -DGLTEST_DEBUG  CMakeFiles/GLTest.dir/main.cpp.obj -o GLTest.exe -Wl,--out-implib,libGLTest.dll.a -Wl,--major-image-version,0,--minor-image-version,0  ../3rd-party/sdl3/lib/libSDL3.dll.a  -lopengl32  -lglu32  -lopengl32  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/GLTest.dir/main.cpp.obj: in function `main':
[build] F:/VSCodeProject/GLTest/main.cpp:85: undefined reference to `__imp_glCreateShader'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:86: undefined reference to `__imp_glCreateShader'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:89: undefined reference to `__imp_glShaderSource'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:90: undefined reference to `__imp_glCompileShader'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:93: undefined reference to `__imp_glGetShaderiv'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:101: undefined reference to `__imp_glShaderSource'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:102: undefined reference to `__imp_glCompileShader'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:104: undefined reference to `__imp_glGetShaderiv'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:111: undefined reference to `__imp_glCreateProgram'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:112: undefined reference to `__imp_glAttachShader'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:113: undefined reference to `__imp_glAttachShader'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:115: undefined reference to `__imp_glBindAttribLocation'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:116: undefined reference to `__imp_glBindAttribLocation'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:117: undefined reference to `__imp_glLinkProgram'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:119: undefined reference to `__imp_glUseProgram'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:127: undefined reference to `__imp_glGenVertexArrays'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:128: undefined reference to `__imp_glGenBuffers'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:129: undefined reference to `__imp_glBindVertexArray'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:130: undefined reference to `__imp_glBindBuffer'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:132: undefined reference to `__imp_glEnableVertexAttribArray'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:133: undefined reference to `__imp_glEnableVertexAttribArray'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:135: undefined reference to `__imp_glVertexAttribPointer'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:136: undefined reference to `__imp_glVertexAttribPointer'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:149: undefined reference to `__imp_glBufferData'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:153: undefined reference to `__imp_glGetUniformLocation'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:153: undefined reference to `__imp_glUniformMatrix4fv'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:171: undefined reference to `__imp_glBindVertexArray'
[build] collect2.exe: error: ld returned 1 exit status
[build] ninja: build stopped: subcommand failed.
[proc] The command: "F:\Program Files\CMake\bin\cmake.EXE" --build f:/VSCodeProject/GLTest/build --config Debug --target all -- exited with code: 1 and signal: null
[build] Build finished with exit code 1
```

Body:
I have simple project for tests. But I can't build the project successfully with MinGW64.
The project consists of CMakeLists.txt and main.cpp

CMakeLists.txt

cmake_minimum_required(VERSION 3.20)

set(PROJECT "GLTest")

set(THIRD_PARTY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rd-party")

set(glm_INSTALL_DIR ${THIRD_PARTY_DIR}/glm)
set(sdl3_INSTALL_DIR ${THIRD_PARTY_DIR}/sdl3)

if (${PREBUILD_SOLUTION})
    project(THIRD_PARTY NONE)

    include(${THIRD_PARTY_DIR}/cmake/glm.cmake)
    include(${THIRD_PARTY_DIR}/cmake/sdl3.cmake)

    return()
else()
    project(${PROJECT})
endif()

enable_language(C)
enable_language(CXX)
enable_language(ASM_NASM)
set(CMAKE_ASM_NASM_OBJECT_FORMAT  win64)
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <INCLUDES> \
<FLAGS> -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_EXTENSIONS off)
set(CMAKE_CXX_STANDARD_REQUIRED on)

if(MSVC)
  #add_compile_options(/W4 /WX)
else()
  #add_compile_options(-Wall -Wextra -Wpedantic )#-Werror)
endif()

set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DGLTEST_DEBUG")

list(APPEND CMAKE_PREFIX_PATH "${THIRD_PARTY_DIR}/sdl3")

find_package(SDL3 REQUIRED SDL3)
find_package(OpenGL 4 REQUIRED OpenGL)

add_executable(${PROJECT} main.cpp)

target_include_directories(${PROJECT} PRIVATE
        ${SDL3_INCLUDE_DIR}
)

target_link_libraries(${PROJECT} PRIVATE
        SDL3::SDL3-static
        OpenGL::GL
        OpenGL::GLU
)

main.cpp

#include <iostream>

#define GL_GLEXT_PROTOTYPES
#include <SDL3/SDL.h>
#include <SDL3/SDL_opengl.h>

typedef float t_mat4x4[16];

static inline void mat4x4_ortho( t_mat4x4 out, float left, float right, float bottom, float top, float znear, float zfar )
{
    #define T(a, b) (a * 4 + b)

    out[T(0,0)] = 2.0f / (right - left);
    out[T(0,1)] = 0.0f;
    out[T(0,2)] = 0.0f;
    out[T(0,3)] = 0.0f;

    out[T(1,1)] = 2.0f / (top - bottom);
    out[T(1,0)] = 0.0f;
    out[T(1,2)] = 0.0f;
    out[T(1,3)] = 0.0f;

    out[T(2,2)] = -2.0f / (zfar - znear);
    out[T(2,0)] = 0.0f;
    out[T(2,1)] = 0.0f;
    out[T(2,3)] = 0.0f;

    out[T(3,0)] = -(right + left) / (right - left);
    out[T(3,1)] = -(top + bottom) / (top - bottom);
    out[T(3,2)] = -(zfar + znear) / (zfar - znear);
    out[T(3,3)] = 1.0f;

    #undef T
}

static const char * vertex_shader =
    "#version 130\n"
    "in vec2 i_position;\n"
    "in vec4 i_color;\n"
    "out vec4 v_color;\n"
    "uniform mat4 u_projection_matrix;\n"
    "void main() {\n"
    "    v_color = i_color;\n"
    "    gl_Position = u_projection_matrix * vec4( i_position, 0.0, 1.0 );\n"
    "}\n";

static const char * fragment_shader =
    "#version 130\n"
    "in vec4 v_color;\n"
    "out vec4 o_color;\n"
    "void main() {\n"
    "    o_color = v_color;\n"
    "}\n";

typedef enum t_attrib_id
{
    attrib_position,
    attrib_color
} t_attrib_id;

int main( int argc, char * argv[] )
{
    SDL_Init( SDL_INIT_VIDEO );
    SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
    SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );
    SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 );
    SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );
    SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );
    SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 8 );

    SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION, 4 );
    SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION, 5 );
    SDL_GL_SetAttribute( SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE );

    static const int width = 800;
    static const int height = 600;

    SDL_Window * window = SDL_CreateWindow( "", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN );
    SDL_GLContext context = SDL_GL_CreateContext( window );

    GLuint vs, fs, program;

    vs = glCreateShader( GL_VERTEX_SHADER );
    fs = glCreateShader( GL_FRAGMENT_SHADER );

    int length = strlen( vertex_shader );
    glShaderSource( vs, 1, ( const GLchar ** )&vertex_shader, &length );
    glCompileShader( vs );

    GLint status;
    glGetShaderiv( vs, GL_COMPILE_STATUS, &status );
    if( status == GL_FALSE )
    {
        fprintf( stderr, "vertex shader compilation failed\n" );
        return 1;
    }

    length = strlen( fragment_shader );
    glShaderSource( fs, 1, ( const GLchar ** )&fragment_shader, &length );
    glCompileShader( fs );

    glGetShaderiv( fs, GL_COMPILE_STATUS, &status );
    if( status == GL_FALSE )
    {
        fprintf( stderr, "fragment shader compilation failed\n" );
        return 1;
    }

    program = glCreateProgram();
    glAttachShader( program, vs );
    glAttachShader( program, fs );

    glBindAttribLocation( program, attrib_position, "i_position" );
    glBindAttribLocation( program, attrib_color, "i_color" );
    glLinkProgram( program );

    glUseProgram( program );

    glDisable( GL_DEPTH_TEST );
    glClearColor( 0.5, 0.0, 0.0, 0.0 );
    glViewport( 0, 0, width, height );

    GLuint vao, vbo;

    glGenVertexArrays( 1, &vao );
    glGenBuffers( 1, &vbo );
    glBindVertexArray( vao );
    glBindBuffer( GL_ARRAY_BUFFER, vbo );

    glEnableVertexAttribArray( attrib_position );
    glEnableVertexAttribArray( attrib_color );

    glVertexAttribPointer( attrib_color, 4, GL_FLOAT, GL_FALSE, sizeof( float ) * 6, 0 );
    glVertexAttribPointer( attrib_position, 2, GL_FLOAT, GL_FALSE, sizeof( float ) * 6, ( void * )(4 * sizeof(float)) );

    const GLfloat g_vertex_buffer_data[] = {
    /*  R, G, B, A, X, Y  */
        1, 0, 0, 1, 0, 0,
        0, 1, 0, 1, width, 0,
        0, 0, 1, 1, width, height,

        1, 0, 0, 1, 0, 0,
        0, 0, 1, 1, width, height,
        1, 1, 1, 1, 0, height
    };

    glBufferData( GL_ARRAY_BUFFER, sizeof( g_vertex_buffer_data ), g_vertex_buffer_data, GL_STATIC_DRAW );

    t_mat4x4 projection_matrix;
    mat4x4_ortho( projection_matrix, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 100.0f );
    glUniformMatrix4fv( glGetUniformLocation( program, "u_projection_matrix" ), 1, GL_FALSE, projection_matrix );

    for( ;; )
    {
        glClear( GL_COLOR_BUFFER_BIT );

        SDL_Event event;
        while( SDL_PollEvent( &event ) )
        {
            switch( event.type )
            {
                case SDL_KEYUP:
                    if( event.key.keysym.sym == SDLK_ESCAPE )
                        return 0;
                    break;
            }
        }

        glBindVertexArray( vao );
        glDrawArrays( GL_TRIANGLES, 0, 6 );

        SDL_GL_SwapWindow( window );
        SDL_Delay( 1 );
    }

    SDL_GL_DeleteContext( context );
    SDL_DestroyWindow( window );
    SDL_Quit();

    return 0;
}

But when I try to build a project, I get a linking error undefined reference to __imp_glCreateShader". I've looked all over the Internet. But I have not found an answer to my question. Maybe someone has faced a similar problem?

UPD:

Build command

[build] cmd.exe /C "cd . && F:\msys64\mingw64\bin\g++.exe -g -DGLTEST_DEBUG  CMakeFiles/GLTest.dir/main.cpp.obj -o GLTest.exe -Wl,--out-implib,libGLTest.dll.a -Wl,--major-image-version,0,--minor-image-version,0  ../3rd-party/sdl3/lib/libSDL3.dll.a  -lopengl32  -lglu32  -lopengl32  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."

Error message

[build] cmd.exe /C "cd . && F:\msys64\mingw64\bin\g++.exe -g -DGLTEST_DEBUG  CMakeFiles/GLTest.dir/main.cpp.obj -o GLTest.exe -Wl,--out-implib,libGLTest.dll.a -Wl,--major-image-version,0,--minor-image-version,0  ../3rd-party/sdl3/lib/libSDL3.dll.a  -lopengl32  -lglu32  -lopengl32  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/GLTest.dir/main.cpp.obj: in function `main':
[build] F:/VSCodeProject/GLTest/main.cpp:85: undefined reference to `__imp_glCreateShader'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:86: undefined reference to `__imp_glCreateShader'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:89: undefined reference to `__imp_glShaderSource'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:90: undefined reference to `__imp_glCompileShader'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:93: undefined reference to `__imp_glGetShaderiv'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:101: undefined reference to `__imp_glShaderSource'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:102: undefined reference to `__imp_glCompileShader'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:104: undefined reference to `__imp_glGetShaderiv'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:111: undefined reference to `__imp_glCreateProgram'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:112: undefined reference to `__imp_glAttachShader'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:113: undefined reference to `__imp_glAttachShader'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:115: undefined reference to `__imp_glBindAttribLocation'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:116: undefined reference to `__imp_glBindAttribLocation'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:117: undefined reference to `__imp_glLinkProgram'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:119: undefined reference to `__imp_glUseProgram'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:127: undefined reference to `__imp_glGenVertexArrays'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:128: undefined reference to `__imp_glGenBuffers'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:129: undefined reference to `__imp_glBindVertexArray'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:130: undefined reference to `__imp_glBindBuffer'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:132: undefined reference to `__imp_glEnableVertexAttribArray'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:133: undefined reference to `__imp_glEnableVertexAttribArray'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:135: undefined reference to `__imp_glVertexAttribPointer'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:136: undefined reference to `__imp_glVertexAttribPointer'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:149: undefined reference to `__imp_glBufferData'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:153: undefined reference to `__imp_glGetUniformLocation'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:153: undefined reference to `__imp_glUniformMatrix4fv'
[build] F:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: F:/VSCodeProject/GLTest/main.cpp:171: undefined reference to `__imp_glBindVertexArray'
[build] collect2.exe: error: ld returned 1 exit status
[build] ninja: build stopped: subcommand failed.
[proc] The command: "F:\Program Files\CMake\bin\cmake.EXE" --build f:/VSCodeProject/GLTest/build --config Debug --target all -- exited with code: 1 and signal: null
[build] Build finished with exit code 1


问:
In PGAdmin, how can I see all tables from my database?
It seems that the SHOW tables command does not work in pgadmin. Any hint on how to visualize all tables headers would be welcome.

I tried SHOW tables and several other commands, with no success.


问:
How to have live data using MEAN stack?
Is there any way to have a live connection to MongoDB?

for example, If I am looking at record A through the client side.
I go to the MongoDB backend and change a value on record A.
I should see that change live in the client side.

is this possible?

I found some videos on youtube for making a live chat app(messaging between users), but that's not exactly what I am looking for

Title: How to have live data using MEAN stack?


问:
Fetching data from multiple api in django rest framwork
First I don't know I'm asking a good question or not. I'm trying to integrate Paytm Payment in my django rest framework. There are many api from paytm like Initiate transaction , fetch all payment, send OTP etc, like in the image below

Im able to initiate transaction but not all payments are available, Inorder to do that I have to call the Fetch Payment Options API. But I don't know how to do that because I'm already calling Initiate transaction API in the view with parameters but I don't know how to call other api with different parameters in the same view. Like when I initiate transaction, the API gets fired and frontend shows the paytm page. So these api should be called on frontend?. I actually don't know how to ask this question properly. I need help


问:
Patch method using dio with xxx-www-form-urlencoded produces internal server error
So, i have been trying to update user data using the patch method. The data should be of

xxx-www-form-urlencoded

Also there are two additional headers required by laravel :

Accept : application/vnd.api+json,
Content-Type : application/vnd.api+json

But when i try to use the patch method in dio it produces 500 status code error.

This is the code for the patch request :

```<code>  Future<CustomerResponse> editCustomer(
      String id, AddCustomerModel addCustomerModel) async {
    print(addCustomerModel.toMap());
    var box = await Hive.openBox("tokenBox");
    String token = box.get("token");
    FormData formData = FormData.fromMap({
      "name": addCustomerModel.name,
      "consumerType": addCustomerModel.consumerType,
      "corporateType": addCustomerModel.corporateType ?? "",
      "amc": addCustomerModel.amc,
      "amcDate": addCustomerModel.amcDate ?? "",
      "address": addCustomerModel.address,
      "phoneNo[]": addCustomerModel.phoneNo,
    });
    try {
      Response response = await dio.patch(
          "${Config.baseUrl}${Config.appFunctionRoute}/id",
          data: formData,
          options:
              Options(contentType: Headers.formUrlEncodedContentType, headers: {
            "Authorization": "Bearer $token",
            "Accept": "application/vnd.api+json",
            "Content-Type": "application/vnd.api+json"
          }));
      if (response.statusCode == 200) {
        return CustomerResponse.fromJson(response.data);
      }
    } catch (e) {
      print(e);
    }
    return CustomerResponse();
  }

So , should i change something in the server side or there is something wrong from my end.
</code>```

Body:
So, i have been trying to update user data using the patch method. The data should be of

xxx-www-form-urlencoded

Also there are two additional headers required by laravel :

Accept : application/vnd.api+json,
Content-Type : application/vnd.api+json

But when i try to use the patch method in dio it produces 500 status code error.

This is the code for the patch request :

  Future<CustomerResponse> editCustomer(
      String id, AddCustomerModel addCustomerModel) async {
    print(addCustomerModel.toMap());
    var box = await Hive.openBox("tokenBox");
    String token = box.get("token");
    FormData formData = FormData.fromMap({
      "name": addCustomerModel.name,
      "consumerType": addCustomerModel.consumerType,
      "corporateType": addCustomerModel.corporateType ?? "",
      "amc": addCustomerModel.amc,
      "amcDate": addCustomerModel.amcDate ?? "",
      "address": addCustomerModel.address,
      "phoneNo[]": addCustomerModel.phoneNo,
    });
    try {
      Response response = await dio.patch(
          "${Config.baseUrl}${Config.appFunctionRoute}/id",
          data: formData,
          options:
              Options(contentType: Headers.formUrlEncodedContentType, headers: {
            "Authorization": "Bearer $token",
            "Accept": "application/vnd.api+json",
            "Content-Type": "application/vnd.api+json"
          }));
      if (response.statusCode == 200) {
        return CustomerResponse.fromJson(response.data);
      }
    } catch (e) {
      print(e);
    }
    return CustomerResponse();
  }

So , should i change something in the server side or there is something wrong from my end.


问:
Python program in VS Code is not running and I keep getting this error in output
```<code>LSP Notebooks experiment is disabled -- Jupyter disabled or not installed LSP Notebooks interactive window support is disabled -- not in LSP Notebooks experiment Python interpreter path: \~\\AppData\\Local\\Programs\\Python\\Python310\\python.exe Starting Pylance language server. \[ERROR 2022-11-17 19:46:13.280\]: sendStartupTelemetry() failed. \[TypeError: Cannot read properties of undefined (reading 'uri')     at m (c:\\Users\\DigitechPC.vscode\\extensions\\ms-python.python-2022.20.1\\out\\client\\extension.js:2:665529)     at t.sendStartupTelemetry (c:\\Users\\DigitechPC.vscode\\extensions\\ms-python.python-2022.20.1\\out\\client\\extension.js:2:666516)\]
</code>```

was expecting output for my program but don't know what to do with this

Body:
LSP Notebooks experiment is disabled -- Jupyter disabled or not installed LSP Notebooks interactive window support is disabled -- not in LSP Notebooks experiment Python interpreter path: \~\\AppData\\Local\\Programs\\Python\\Python310\\python.exe Starting Pylance language server. \[ERROR 2022-11-17 19:46:13.280\]: sendStartupTelemetry() failed. \[TypeError: Cannot read properties of undefined (reading 'uri')     at m (c:\\Users\\DigitechPC.vscode\\extensions\\ms-python.python-2022.20.1\\out\\client\\extension.js:2:665529)     at t.sendStartupTelemetry (c:\\Users\\DigitechPC.vscode\\extensions\\ms-python.python-2022.20.1\\out\\client\\extension.js:2:666516)\]

was expecting output for my program but don't know what to do with this


问:
spring boot integration ip (tcp) force flush in order to respond
I am now making TCP socket server using Spring boot integration ip.

public AbstractServerConnectionFactory serverConnectionFactory() {
    TcpNioServerConnectionFactory serverConnectionFactory = new TcpNioServerConnectionFactory(port);
    serverConnectionFactory.setUsingDirectBuffers(true);
    serverConnectionFactory.setSoTcpNoDelay(true);
    serverConnectionFactory.setSoKeepAlive(true);
    serverConnectionFactory.setSoTimeout(5);
    serverConnectionFactory.setSingleUse(false);

    // I use ByteArrayStxEtxSerializer provided by Spring boot.
    serverConnectionFactory.setSerializer(SERIALIZER);
    serverConnectionFactory.setDeserializer(SERIALIZER);

    return serverConnectionFactory;
}
```
<p>My test client code is like this:</p>
```Socket sock = new Socket("127.0.0.1", 8081);

OutputStream os = new BufferedOutputStream(sock.getOutputStream());
BufferedReader br = new BufferedReader(new InputStreamReader(sock.getInputStream()));

ByteArrayOutputStream baos = new ByteArrayOutputStream();

baos.write(0x02); // STX
baos.write(0x41); // A
baos.write(0x03); // ETX

System.out.println(Arrays.toString(baos.toByteArray()));
os.write(baos.toByteArray());
os.flush();

String line = null;

while ((line = br.readLine()) != null) {
    System.out.println("from server: " + line);
}

os.close();
br.close();
sock.close();
```

In order to flush output stream into client, I need to set setSingleUse(true) or setSoTimeout(n). Otherwise, it blocks for a while.

I read the following from the official document:

An outbound TCP gateway is provided. It allows for simple
request-response processing. If the associated connection factory is
configured for single-use connections, a new connection is immediately
created for each new request. Otherwise, if the connection is in use,
the calling thread blocks on the connection until either a response is
received or a timeout or I/O error occurs.

I think my test client waits until timeout for about 2 minutes if I don't set single-use or timeout.

How can I force the server to flush output stream into socket instead of single-use or timeout?

Thank you.

Body:
I am now making TCP socket server using Spring boot integration ip.

public AbstractServerConnectionFactory serverConnectionFactory() {
    TcpNioServerConnectionFactory serverConnectionFactory = new TcpNioServerConnectionFactory(port);
    serverConnectionFactory.setUsingDirectBuffers(true);
    serverConnectionFactory.setSoTcpNoDelay(true);
    serverConnectionFactory.setSoKeepAlive(true);
    serverConnectionFactory.setSoTimeout(5);
    serverConnectionFactory.setSingleUse(false);

    // I use ByteArrayStxEtxSerializer provided by Spring boot.
    serverConnectionFactory.setSerializer(SERIALIZER);
    serverConnectionFactory.setDeserializer(SERIALIZER);

    return serverConnectionFactory;
}

My test client code is like this:

Socket sock = new Socket("127.0.0.1", 8081);

OutputStream os = new BufferedOutputStream(sock.getOutputStream());
BufferedReader br = new BufferedReader(new InputStreamReader(sock.getInputStream()));

ByteArrayOutputStream baos = new ByteArrayOutputStream();

baos.write(0x02); // STX
baos.write(0x41); // A
baos.write(0x03); // ETX

System.out.println(Arrays.toString(baos.toByteArray()));
os.write(baos.toByteArray());
os.flush();

String line = null;

while ((line = br.readLine()) != null) {
    System.out.println("from server: " + line);
}

os.close();
br.close();
sock.close();

In order to flush output stream into client, I need to set setSingleUse(true) or setSoTimeout(n). Otherwise, it blocks for a while.

I read the following from the official document:

An outbound TCP gateway is provided. It allows for simple
request-response processing. If the associated connection factory is
configured for single-use connections, a new connection is immediately
created for each new request. Otherwise, if the connection is in use,
the calling thread blocks on the connection until either a response is
received or a timeout or I/O error occurs.

I think my test client waits until timeout for about 2 minutes if I don't set single-use or timeout.

How can I force the server to flush output stream into socket instead of single-use or timeout?

Thank you.


问:
JavaScript Spring Batch SQl to XML insert a space between integers in zip code. Query returns xxxxxx and the xml needs xxx xxx
Aa the title says, I'm writing a spring batch to run a sql query and write an overly comolicated xml.  One is for my zip code return.  The SQL database stores CA zip codes as xxxxxx but due to requirements, I need the zip code in the xml to write

xxx xxx

I can't figure out where I would add this function: my model class, or my writer, nor do I know how to write a function to do so.

Would I have to save the sql query to a csv then use an xmlwriter to accomplish this?


问:
Can I see the graph in VS Code by using jupyter view?
```<code>import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import style
style.use("fivethirtyeight")
df = pd.DataFrame({'day':[1,2,3,4,5],'visitors':[200,302,480,590,680],'Bounce_rate':[20,30,40,50,60]})
df.set_index('day',inplace=True)

df.plot()
plt.show()
</code>```

output is
, the desired output is a graph (in VS Code).

I can see my code is correct when using cloud jupyter by achieving the desired output but it's not possible in VS Code jupyter view...

Am I doing something wrong? or is it something else?

Body:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import style
style.use("fivethirtyeight")
df = pd.DataFrame({'day':[1,2,3,4,5],'visitors':[200,302,480,590,680],'Bounce_rate':[20,30,40,50,60]})
df.set_index('day',inplace=True)

df.plot()
plt.show()

output is
, the desired output is a graph (in VS Code).

I can see my code is correct when using cloud jupyter by achieving the desired output but it's not possible in VS Code jupyter view...

Am I doing something wrong? or is it something else?


问:
How to disable little text "str:" hints on NetBeans 16?
enter image description here

I don't know if this happens in other situations besides StringBuilder, I don't remember. But it's pretty annoying that little gray text that says "str:".
I don't know if it's some kind of hint, but I'd like to know how to disable it.

I have tried to solve it in "Tools - Options - Editor - Hints" turning different options on and off, but I have not managed to disable it yet


问:
time_amount says it is undefined even tho there are 2 arguments
when i execute the command with 2 agrumments it then sends in the channel "member gas been timed out for undefined seconds"

example command: !timeout @user 10

```<code>    if (command === 'timeout'){
       let { member, time_amount} = args
                if (!args.length) {
            return message.channel.send(`You didn't provide a amount of time or a member, ${message.author}!`);
        } else {
            if(args.length = 0){
                message.channel.send(`there are only ${args.length} argument please add the right arguments`)
            }
            else{
                if(args.length = 1){

             console.log(time_amount)
            if(isNaN(time_amount)){
                if (message.member.roles.cache.find(r => r.name === 'owner')){
            const member = message.mentions.members.first() || message.guild.members.cache.get(argument[0]) || message.guild.members.cache.find( x => x.user.username.toLocaleLowerCase() === argument.slice(0).join(" " || x.user.username === argument[0]));
            member.timeout()
            message.channel.send(`member has been timed out for `+ time_amount + ` seconds`)
            setTimeout(function(){message.channel.send('the user <@' + member.id + '> is not in timeout anymore.')}, time_amount)
        }
        else{
       message.channel.send('you dont have the right promitions <@' + message.author.id + '>.')
        }
            }
            else{
                message.channel.send(`time amount is not a number, <@${message.author.id}>`)
        }
                }
                else{
                    message.channel.send(`there are to many agruments please add the right arguments`)
                }

     }

    }

    }
</code>```

i want that time_amount stores the second argument so could somebody help me

Body:
when i execute the command with 2 agrumments it then sends in the channel "member gas been timed out for undefined seconds"

example command: !timeout @user 10

    if (command === 'timeout'){
       let { member, time_amount} = args
                if (!args.length) {
            return message.channel.send(`You didn't provide a amount of time or a member, ${message.author}!`);
        } else {
            if(args.length = 0){
                message.channel.send(`there are only ${args.length} argument please add the right arguments`)
            }
            else{
                if(args.length = 1){

             console.log(time_amount)
            if(isNaN(time_amount)){
                if (message.member.roles.cache.find(r => r.name === 'owner')){
            const member = message.mentions.members.first() || message.guild.members.cache.get(argument[0]) || message.guild.members.cache.find( x => x.user.username.toLocaleLowerCase() === argument.slice(0).join(" " || x.user.username === argument[0]));
            member.timeout()
            message.channel.send(`member has been timed out for `+ time_amount + ` seconds`)
            setTimeout(function(){message.channel.send('the user <@' + member.id + '> is not in timeout anymore.')}, time_amount)
        }
        else{
       message.channel.send('you dont have the right promitions <@' + message.author.id + '>.')
        }
            }
            else{
                message.channel.send(`time amount is not a number, <@${message.author.id}>`)
        }
                }
                else{
                    message.channel.send(`there are to many agruments please add the right arguments`)
                }

     }

    }

    }

i want that time_amount stores the second argument so could somebody help me


问:
my loop requests is wrong, I can't find the error to write in blob
```<code>[enter image description here][1]
</code>```

I need to make the requests and then save it to the blob, but my loop continues and always saves the last requests to the filename.

```<code>
while True:
  for Chunks in chunkID:
    url = f"https://####/2/0/workspaces/{workspaceID}/models/{modelID}/files/{fileID}/chunks/" + str(Chunks)
    urlsTotais.append(url)

  for Chunkss in chunkID:
      filename = '/mnt/blob/Brazil/Finance/Fpna/API/Anaplan/'+sistema+'/' + str(now.year) +'/'+ str(now.month).zfill(2) +'/'+ str(now.day).zfill(2)+'/'+'file'+ str(Chunkss) +'.parquet'
      BlobPreLandingZonePathTest.append(filename)

  for RequestsUrl in urlsTotais:
      response08 = requests.get(RequestsUrl, headers=headers_oc)
      print('complete:{}'.format(RequestsUrl))
      #time.sleep(3)
      if response08.status_code == 200 and response08 != None:
        x = response08.text
        df = pd.read_csv(io.StringIO(x), sep=',',header = 9,low_memory=False)
        df = df.T.reset_index(drop=True).T
        dff = spark.createDataFrame(df)
**        for name in BlobPreLandingZonePathTest:
          toblob= dff.write.mode('overwrite').parquet(name)
          print(name)**
  else:
       print('Found {} CHUNKS!!'.format(Chunks))
  break
</code>```

I need to make the requests and then save it to the blob, but my loop continues and always saves the last requests to the filename.

```<code>ERROR:

complete:https://####/2/0/workspaces/8a81b0116d9dab55016e225c95726bc6/models/5365B94E805C44A3AD4564591AD29CFC/files/116000000036/chunks/0
/mnt/blob/########/2022/12/17/file0.parquet
/mnt/blob/########/2022/12/17/file1.parquet
/mnt/blob/########/2022/12/17/file2.parquet

I JUST NEED ONE LIKE THIS:
complete:https://####/2/0/workspaces/8a81b0116d9dab55016e225c95726bc6/models/5365B94E805C44A3AD4564591AD29CFC/files/116000000036/chunks/0
/mnt/blob/########/2022/12/17/file0.parquet

complete:https://####/2/0/workspaces/8a81b0116d9dab55016e225c95726bc6/models/5365B94E805C44A3AD4564591AD29CFC/files/116000000036/chunks/1
/mnt/blob/########/2022/12/17/file1.parquet
</code>```

Body:
[enter image description here][1]

I need to make the requests and then save it to the blob, but my loop continues and always saves the last requests to the filename.

while True:
  for Chunks in chunkID:
    url = f"https://####/2/0/workspaces/{workspaceID}/models/{modelID}/files/{fileID}/chunks/" + str(Chunks)
    urlsTotais.append(url)

  for Chunkss in chunkID:
      filename = '/mnt/blob/Brazil/Finance/Fpna/API/Anaplan/'+sistema+'/' + str(now.year) +'/'+ str(now.month).zfill(2) +'/'+ str(now.day).zfill(2)+'/'+'file'+ str(Chunkss) +'.parquet'
      BlobPreLandingZonePathTest.append(filename)

  for RequestsUrl in urlsTotais:
      response08 = requests.get(RequestsUrl, headers=headers_oc)
      print('complete:{}'.format(RequestsUrl))
      #time.sleep(3)
      if response08.status_code == 200 and response08 != None:
        x = response08.text
        df = pd.read_csv(io.StringIO(x), sep=',',header = 9,low_memory=False)
        df = df.T.reset_index(drop=True).T
        dff = spark.createDataFrame(df)
**        for name in BlobPreLandingZonePathTest:
          toblob= dff.write.mode('overwrite').parquet(name)
          print(name)**
  else:
       print('Found {} CHUNKS!!'.format(Chunks))
  break

I need to make the requests and then save it to the blob, but my loop continues and always saves the last requests to the filename.

ERROR:

complete:https://####/2/0/workspaces/8a81b0116d9dab55016e225c95726bc6/models/5365B94E805C44A3AD4564591AD29CFC/files/116000000036/chunks/0
/mnt/blob/########/2022/12/17/file0.parquet
/mnt/blob/########/2022/12/17/file1.parquet
/mnt/blob/########/2022/12/17/file2.parquet

I JUST NEED ONE LIKE THIS:
complete:https://####/2/0/workspaces/8a81b0116d9dab55016e225c95726bc6/models/5365B94E805C44A3AD4564591AD29CFC/files/116000000036/chunks/0
/mnt/blob/########/2022/12/17/file0.parquet

complete:https://####/2/0/workspaces/8a81b0116d9dab55016e225c95726bc6/models/5365B94E805C44A3AD4564591AD29CFC/files/116000000036/chunks/1
/mnt/blob/########/2022/12/17/file1.parquet


问:
One password to show multiple text/div with different IDs
I want to show multiple text or div (with different IDs0, with one password. Sorry I'm just new to JavaScript. Here is what I try but it didn't work.</p>
```<code><!DOCTYPE html>
<html>
<head>
</head>
<body>
   Enter 'secret' to see the div.
<br>
<input type="text" onkeyup="check_password (this);">
<br>
<div id="hidden_div1" style="display: none;">I was hidden text 1...</div>
<br>
<div id="hidden_div2" style="display: none;">I was hidden text 2...</div>
<br>
<div id="hidden_div3" style="display: none;">I was hidden text 3...</div>

    <script type="text/javascript">
        function check_password (input_element) {
  //get value of input
  var password = input_element.value;
  //check value and show/hide the div
  if (password == 'secret')
      document.querySelectorAll("[id^='hidden_div']").style.display = 'block';
  else
      document.querySelectorAll("[id^='hidden_div']").style.display = 'none';
}
    </script>
</body>
</html>
</code>```

Body:
I want to show multiple text or div (with different IDs0, with one password. Sorry I'm just new to JavaScript. Here is what I try but it didn't work.

<!DOCTYPE html>

   Enter 'secret' to see the div.

<input type="text" onkeyup="check_password (this);">

I was hidden text 1...

I was hidden text 2...

I was hidden text 3...


问:
Screenshot isn't attached to allure results folder and in the allure report
Screenshot isn't attached to allure results folder and in the allure report. I don't understand what's the problem. Have tried to add listeners in testng.xml and in the test class above the test name - no difference-> the png file isn't shown in the allure results when the test is failed. What am I doing wrong?</p>
```<code>
public class AllureReportListener implements ITestListener {
   @Attachment(value = "Page screenshot", type = "image/png")
    public byte[] saveScreenshotPNG (WebDriver driver) {
        return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
    }
    @Override
    public void onStart(ITestContext iTestContext) {
        System.out.println("Starting Test Suite '" + iTestContext.getName() + "'.......");
        iTestContext.setAttribute("WebDriver", BaseTest.getDriver());
    }

    @Override
    public void onFinish(ITestContext iTestContext) {
        System.out.println("Finished Test Suite '" + iTestContext.getName() + "'");
    }

    @Override
    public void onTestStart(ITestResult iTestResult) {
        System.out.println("Starting Test Method '" + getTestMethodName(iTestResult) + "'");
    }

    @Override
    public void onTestSuccess(ITestResult iTestResult) {
        System.out.println("Test Method '" + getTestMethodName(iTestResult) + "' is Passed");
    }

    @Override
    public void onTestFailure(ITestResult iTestResult) {
        System.out.println("Test Method '" + getTestMethodName(iTestResult) + "' is Failed");
        if (BaseTest.getDriver() != null) {
            System.out.println("Screenshot has captured for the Test Method '" + getTestMethodName(iTestResult) + "'");
            saveScreenshotPNG(BaseTest.getDriver());
        }
    }

    @Override
    public void onTestSkipped(ITestResult iTestResult) {
        System.out.println("Test Method '" + getTestMethodName(iTestResult) + "' is Skipped");
    }

    @Override
    public void onTestFailedButWithinSuccessPercentage(ITestResult iTestResult) {
    }

    private static String getTestMethodName(ITestResult iTestResult) {
        return iTestResult.getMethod().getConstructorOrMethod().getName();
    }
}

</code>```

Body:
Screenshot isn't attached to allure results folder and in the allure report. I don't understand what's the problem. Have tried to add listeners in testng.xml and in the test class above the test name - no difference-> the png file isn't shown in the allure results when the test is failed. What am I doing wrong?

public class AllureReportListener implements ITestListener {
   @Attachment(value = "Page screenshot", type = "image/png")
    public byte[] saveScreenshotPNG (WebDriver driver) {
        return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
    }
    @Override
    public void onStart(ITestContext iTestContext) {
        System.out.println("Starting Test Suite '" + iTestContext.getName() + "'.......");
        iTestContext.setAttribute("WebDriver", BaseTest.getDriver());
    }

    @Override
    public void onFinish(ITestContext iTestContext) {
        System.out.println("Finished Test Suite '" + iTestContext.getName() + "'");
    }

    @Override
    public void onTestStart(ITestResult iTestResult) {
        System.out.println("Starting Test Method '" + getTestMethodName(iTestResult) + "'");
    }

    @Override
    public void onTestSuccess(ITestResult iTestResult) {
        System.out.println("Test Method '" + getTestMethodName(iTestResult) + "' is Passed");
    }

    @Override
    public void onTestFailure(ITestResult iTestResult) {
        System.out.println("Test Method '" + getTestMethodName(iTestResult) + "' is Failed");
        if (BaseTest.getDriver() != null) {
            System.out.println("Screenshot has captured for the Test Method '" + getTestMethodName(iTestResult) + "'");
            saveScreenshotPNG(BaseTest.getDriver());
        }
    }

    @Override
    public void onTestSkipped(ITestResult iTestResult) {
        System.out.println("Test Method '" + getTestMethodName(iTestResult) + "' is Skipped");
    }

    @Override
    public void onTestFailedButWithinSuccessPercentage(ITestResult iTestResult) {
    }

    private static String getTestMethodName(ITestResult iTestResult) {
        return iTestResult.getMethod().getConstructorOrMethod().getName();
    }
}


问:
How to handle a list of dynamic webelements on mobile app automation (SeeTest/JavaScript/BDD)
First time here.

I have automated a dynamic page with a list of questions that change each time you land on that page. Sometimes it might be a checkbox and sometimes a date field or a radio button. For desktop, I am handling it by getting the objectlist and answering each question based on whether it a radio button, checkbox, date field.

My issue is that sometimes the question has a subquestion. My desktop code is fine. But on the mobile app, we have to swipe to each question one by one.

In my desktop code, the first loop, the first question gets answered. In the second iteration, the subquestions will get answered.

This takes too long for mobile app.

Is there a better of handling this on the app?  I am using SeeTest, JavaScript, BDD, Cucumber/Gherkin.