When should I use CROSS APPLY over INNER JOIN?

What is the main purpose of using CROSS APPLY? I have read (vaguely, through posts on the Internet) that cross apply can be more efficient when selecting over large data sets if you are...

What is the fastest substring search algorithm?

OK, so I don't sound like an idiot I'm going to state the problem/requirements more explicitly: Needle (pattern) and haystack (text to search) are both C-style null-terminated strings. No length...

Why does modern Perl avoid UTF-8 by default?

I wonder why most modern solutions built using Perl don't enable UTF-8 by default. I understand there are many legacy problems for core Perl scripts, where it may break things. But, from my point...

Multithreaded file copy for Linux needed

I have a "large" amount of data that needs to be copied every day. (6TB) It is 15 disks presented from a SAN over Fibre Channel and being copied to a local array consisting of 22 spindles. sources...

PDO “Uncaught exception 'PDOException' .. Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll().”

I know this question has been asked many times, but I've read the answers to many of the questions and still cannot understand why I am receiving this error: Fatal error: Uncaught exception...

Antlr4 "Test Rig" and maven

I am struggling a little bit to figure out how I can use the antlr4 maven plug in to run the TestRig class? I've read though the output of mvn antlr4:help -Ddetail=true, which is the only...

Using FTD2XX_NET managed .NET wrapper class to read real time temperature data

I have a problem reading real time temperature data from the DS18B20+ sensor on a DLPIO20 device. I'm using the FTD2XX.DLL .NET wrapper (version 1.0.14) on the Windows platform (as per link:...

Once again: strict aliasing rule and char*

The more I read, the more confused I get. The last question from the related ones is closest to my question, but I got confused with all words about object lifetime and especially - is it OK to...

best possible implementation of the travelling salesman / vehicle routing use case

I recently came across a case in interview when use case which was asked to be solved belongs to travelling salesman problem / vehicle routing problem. I was able to tell them what the actual...

RelatedObjectDoesNotExist: User has no userprofile

So I've extended my user with the field score like this: models.py: class UserProfile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) score =...

Handling very large data with mysql

Sorry for the long post! I have a database containing ~30 tables (InnoDB engine). Only two of these tables, namely, "transaction" and "shift" are quite large (the first one have 1.5 million rows...

Options for persisting static data in Laravel

I'm learning Stripe API through Cashier with a small Laravel app. My goal is to store subscription plans in a local data source other than a DB. Ideally, I would like to end up with a Collection...

Drawing features in OpenLayers 2

I have created a code in Openlayers 2 for selecting the various Google Maps themes (sat, road, terraing etc). On top of that i have input some custom features from Geoserver. I want to add some...

Display element outside of "overflow: hidden" in Swiper slider

THE PROBLEM I have a swiper slider: http://codepen.io/kerowan/pen/xqYrwJ (recreate problem for example by giving .product-info-wrapper a fixed height of around 100px) In the slides, there is an...

WordPress Plugin : readme.txt is not read by WordPress

I'm currently developing a private WordPress Plugin using BoilerPlate for the bases and Plugin-update-checker for automatic update (without my plugin being on official WordPress repository). Right...

How to sign git commits from within an IDE like IntelliJ?

Question How do I sign git commits using an IDE like IntelliJ on Windows? If you're interested, read what I tried here: I followed mainly Github's guide. I made sure to not forget to restart...

AWS ApiGateway Proxy to non-Public S3 Bucket

The following cloudformation script sets up an Api Gateway method that proxies to an S3 bucket. The S3BucketPolicy opens up the bucket to public read access but the AWS UI warns that this should...

How to concatenate immutable vectors in one line?

I have immutable vectors a and b where the elements are cheap to copy and I want to create a vector that forms the concatenation of these existing vectors without changing them (*). An earlier...

ZX Spectrum - Issue with RS232 (Serial Port)

I recently got hold of a ZX Spectrum +3 and am trying to get RS232 working with the spectrum. I’ve built a cable (‘BT’ style connector <-> DB9 serial) following the pin out of the cable...

google.cloud namespace import error in __init__.py

I have read through at least a dozen different stackoverflow questions that all present the same basic problem and have the same basic answer: either the module isn't installed correctly or the OP...

Adventures in Installing a C#/WPF Application (WiX)

I've got a C#/WPF application that is one step up from simple - it's got the main application, a couple of libraries, and then some NuGet packages. If I look in the project's...

How to find keywords in a text file using python's sklearn

I want to create a way to optimize my resume using a python script. To do this, I am trying to find keywords used in the job listing that I can add to my resume to make it stand out when it is run...

Turn off x-axis marginal distribution axes on jointplot using seaborn package

There is a similar question here, however I fail to adapt the provided solutions to my case. I want to have a jointplot with kind=hex while removing the marginal plot of the x-axis as it contains...

Why does this function run so much faster when it makes an extra read of memory?

I'm currently trying to understand the performance properties of certain loops on x86_64 (specifically, my Intel(R) Core(TM) i3-8145U CPU @ 2.10GHz processor). Specifically, adding an extra...

Creating Real-Time Input & Output Stream To Command Prompt in C#

General Question How would one create a direct input / output stream to and from an instance of command prompt (cmd.exe) using some form of a C# application, whether it be WinForms, WPF, or UWP....

PostgreSQL 13 + Python 3.7.9 + plpython3u: 'psql: server closed the connection unexepectedly.' + 'The application has lost the database connection.'

I have added all of the details I could find, with all of the links, and there is no way to get plpython3u to work on Windows in PostgreSQL 13, it seems. Better do not read through this long...

Complex monad transformer for IO monad

I am trying to write a Cats MTL version of a function that would save an entity to a database. I want this function to read some SaveOperation[F[_]] from environment, execute it and handle...

Printing dynamic table - how to make as good as possible

I'm generating dynamically table N columns x M rows and I'm trying to make it print with default printing options as good as possible So, Whenever we're printing the table on A1/A2/A3/A4 paper,...

Python to C++ Communication Failure

I have 4 numpy arrays in python. I'm sending them to a spawned c++ process. This works with small arrays, but when the array gets too big, the c++ program reads (what appears to be the opposite...

Efficiently shift-or large bit vector

I have large in-memory array as some pointer uint64_t * arr (plus size), which represents plain bits. I need to very efficiently (most performant/fast) shift these bits to the right by some amount...