Categories
Mastering Development

Serilog MSSqlServer is not logging errors

Before I get into the problem, I must explain where and why I created the code the way I did. I am following a tutorial on PluralSight which explains logging: https://app.pluralsight.com/library/courses/dotnet-logging-using-serilog-opinionated-approach/discussion So, I created a static class and amended it slightly (because the course is out of date) and came up with this: public static […]

Categories
CMS Magento Mastering Development

Magento + ElasticSearch not showing search results

Before I enabled ElasticSearch the search bar would give me a list of categories, products, and blog posts that matched. And when I hit enter the search results page would contain the matching products. After I enabled ElasticSearch the products are no longer in the list with the categories and posts, and the results page […]

Categories
Mastering Development

Python: SqlAlchemy map existing view to ORM Object

I currently try to map an existing view within my postgreSQL DB to an SqlAlchemy ORM object in python. My view has the following name path_number_view and joins some tables together. It is wokring fine. But I am not able to map the view to an ORM object, when starting the application I get an […]

Categories
Mastering Development

php fatal error: cannot redeclare App\Exceptions\Handler::render() in G:\Xampp\htdocs\blog\app\Exceptions\Handler.php on line 55

I am creating a User Roles and Permissions using laravel 5.8, and in that when I want to run PermissionTableSeeder and i run in cmd like this: php artisan db:seed –class=PermissionTableSeeder . But it showing this error: php fatal error: cannot redeclare App\Exceptions\Handler::render() in G:\Xampp\htdocs\blog\app\Exceptions\Handler.php on line 55 and this is my code: <?php namespace […]

Categories
Development

Data Binding based on loaded XML-Model at runtime

My aim is to create an application which acts like an “editor” for xml-files. The UI was done by JavaFx. There is a menu bar, at which the user can “open” a well defined xml-file, which is loaded by Jaxb and is hold as a static variable in a Config-class. Now, the UI should show […]

Categories
Development

NLog MySql .Net Core 3.0 logging not saving to database

I have setup NLog on my project that will save the logging to my audit database (separate from the default database). However, it is failing to write to the database. I have a console logger target as well and that is logging as expected. No errors are shown or given. It merely fails to write […]

Categories
Development

How to send data from HTTP input to ElasticSearch using Logstash ans jdbc_streaming filter?

I want to send data from Http to elasticsearch using logstash and I want to enrich my data using jdbc_streaming filter plugin. This is my logstash config: input { http { id => “sensor_data_http_input” user => “sensor_data” password => “sensor_data” } } filter { jdbc_streaming { jdbc_driver_library => “E:\ElasticStack\mysql-connector-java-8.0.18\mysql-connector-java-8.0.18.jar” jdbc_driver_class => “com.mysql.jdbc.Driver” jdbc_connection_string => “jdbc:mysql://localhost:3306/sensor_metadata” […]

Categories
Development

ArgumentError error while creating SQLAlchemy database

I can’t understand what the mistake was, I did everything according to the instructions) An error occurs while trying to create a database Text error: Traceback (most recent call last): File “C:\Users\Alex\Desktop\AlNews\env\lib\site-packages\sqlalchemy\sql\schema.py”, line 108, in _init_items spwd = item._set_parent_with_dispatch AttributeError: ‘function’ object has no attribute ‘_set_parent_with_dispatch’ The above exception was the direct cause of the […]

Categories
Development GitHub

How to alter dropEvent action in treeview without loosing basic drag-n-drop functionality in PyQt5?

I’m using my custom item model (subclassed from QAbstractItemModel) with custom QTreeView. I want to allow internal drag-n-drop movement (MoveAction) and, when modifier key or right mouse button is pressed, pass CopyAction to my model (to dropMimeData) to copy items. However, default implementation of dropEvent() in QTreeView seems (from C code) only capable of passing […]

Categories
Development

simple Compiler (separation of instruction in a procedural programs)

I am writing a program that simulates a simple compiler by using regex. When I find a “;” I separate the instructions… then I use another regex for the separation inside each line to get the tokens then put it in a Arraylist, for example: int x=5; int y=6; it will be [ [int, x, […]