Categories
Mastering Development

TLS (Thread-Local-Storage) Callback support in Delphi 10 versions

I’m reading this article that explain how to set a TLS callback in Delphi. The article author says the example works on “Delphi: 2007, 2010, XE4, XE10”. But I have tested on Delphi 10 Seattle, Berlin, and Rio, and it does not work (the TLS callback is not executed), but when i test it on […]

Categories
Development

Webscraping: simplify the code using a for loop inside a dictionary

I’ve built a code for webscraping some brazilian news pages, but i’ve come to realize now that maybe it is unnecessarily long. I’m trying to simplify things with a for loop, but i can’t find the same results. No need for showin me a brand new code, as i’m stil learning. But if someone could […]

Categories
Development

Slow row count and self join on common table expression result set [closed]

I have a fairly complex SQL, which I have broken into 4 consecutive common table expressions(CTE). The first 3 expressions do the heavy lifting and contain most of the logic. A total of ~6000 records are returned after the third CTE and the average execution time is ~ 500 ms which is descent in my […]

Categories
Development

PyQT5 and Filtering a Table using multiple columns

I am trying to make a PyQt5 GUI to show a Pandas dataframe in the form of a table and provide column filtering options, similar to the Microsoft Excel filters. So far I managed to adopt a similar SO answer. Here is the picture of my table in the GUI: As shown in the figure […]

Categories
Development Linux Ubuntu

Сan’t uninstall the WPS Office v. 11.1.0.9080 on Ubuntu 19.10

There’s no way I can remove the WPS Office… I installed WPS Office 2019 For Linux v. 11.1.0.9080 from wps-office_11.1.0.9080.XA_amd64.deb using GDebi. Now I need to remove it. In Ubuntu 19.10 I use command: $ sudo apt-get purge wps-office I have got result: Reading package lists… Done Building dependency tree Reading state information… Done The […]

Categories
Development

PyQt5 and Filtering a Table

I am trying to make a PyQt5 GUI to show a Pandas dataframe in the form of a table and provide column filtering options with check boxes, a search bar and select all option, similar to the Microsoft Excel as below: My table shows attributes of measurement sites. I’d like to filter site codes based […]

Categories
Development Linux

Getting strange error when trying to login through “su user”

When I’m login as root, all is fine, but when I’m trying to log in directly with user or “su username” command I’m getting this. Does anyone have thoughts about why this might happen? (1:43)# su username Traceback (most recent call last): File “/usr/bin/lshell”, line 52, in <module> main() File “/usr/bin/lshell”, line 38, in main […]

Categories
Development

react impliment activity wheel while waiting on API call to return data

Just trying to return some data from the Magic the Gathering API (super fun game by the way). The api is a little slow to return data when I try to make a call to get some cards by searching for them. I have a react bootstrap modal that pops up whenever I search a […]

Categories
Development

Optimize PyQt5 QAbstractView for Pandas Model

I am currently writing a SQL query interface through Python. When writing the data into a QTableView, I am using a QAbstractTableModel to write the query result. This works fine for smaller queries, but becomes extremely slow when trying to present many rows and columns. Is there anyway to increase the speed that the dataframe […]

Categories
Development

Parse XML based on node attribute and edit when found

I am trying to write a VBA script that works as a macro for an Excel file and translates this to an XML file. This I have been able to achieve however it needs to check its own data on the fly to prevent double notations. The data is sorted based on a marker called […]