Quantcast
Channel: User Hubro - Stack Overflow
Browsing all 42 articles
Browse latest View live
↧

Comment by Hubro on Can decorators modify type hints in the function...

In hindsight, this would probably have been better solved by connection pooling, keeping the connection logic out of the business logic altogether.

View Article


Comment by Hubro on Is it possible to implement a trait on specific...

@jthulhu That's a new concept to me, if you could write a short example in a new answer I'll give it a +1 :)

View Article

Comment by Hubro on Is it possible to implement a trait on specific...

Ooh that's cool, that makes total sense. Perhaps a token! macro is the best fit for my needs.

View Article

Comment by Hubro on Is it possible to compile and test a single module in...

@PitaJ I can do that. The build errors are all in modules that depend on the current module, but the current module and all its dependencies compile just fine. I could extract the current module and...

View Article

Comment by Hubro on Conditionally compile only one module at a time

"the basic unit of compilation is a crate, so you can't compile a subset of a crate" - I keep hearing this, but it doesn't make any sense to me. Is this just an ideological position or are there...

View Article


Comment by Hubro on Can you get the number of lines of code from a GitHub...

The premise of the original answer was without cloning the repository, i.e. without having it available locally. You've entirely skipped that part in your answer, assuming that the repository is...

View Article

Comment by Hubro on How do I debug why a key mapping is randomly getting...

Before, it says i <C-K> *@<Cmd>lua vim.lsp.buf.signature_help()<CR> and "Last set from Lua". Afterwards it just says "no mapping found".

View Article

Comment by Hubro on Docker follow symlink outside context

I don't understand the rationale. How is adding files from URLs repeatable, but not from the parent directory in the same Git repository?

View Article


Comment by Hubro on Retrieving environment variable with Robot

Bonus tip: Set a default value like %{STAGING_SERVER=127.0.0.1}

View Article


Comment by Hubro on How does the "registry-mirrors" setting work in Docker?...

@BMitch There is no scenario. I'm trying to figure out what will happen if this configuration is added to every github runner in a very large k8s cluster at my company. I don't think the right approach...

View Article

Comment by Hubro on How to test dockerignore file?

"reads glob patterns in the same format as .gitignore and .dockerignore" <- This doesn't make any sense, .gitignore and .dockerignore files are not the same. For example, in .dockerignore, file...

View Article

Comment by Hubro on Is it possible to style a text input to fill the width of...

@JGallardo Well that's good, it has been 12 years after all 😀

View Article

How to configure root logger + custom logger without duplicate log entries

I want to configure the root logger and my project's custom logger separately. Here's my current logging configuration:logging.config.dictConfig( { "version": 1, "root": { "handlers": ["stdout"],...

View Article


How do I get Symfony to specify my charset in all responses?

All responses from my Symfony 2 application all have this header line:Content-Type: text/htmlSo my browser assumes the output charset is ISO-8859-1. I would like the header to say:Content-Type:...

View Article

Image may be NSFW.
Clik here to view.

Where is this rogue white-space coming from?

This is a screenshot from Opera using FireFly. It clearly illustrates the padding (5px) and margin (0px) of the textbox. However, to the right of the textbox is an unidentified black space of...

View Article


How do I set up Vim to compile using Visual Studio 2010's C++ compiler?

I can compile from the command line by running vcvarsall.bat, then running cl.exe with my source file as the only argument. The problem is that just running cl.exe without first setting up the...

View Article

Image may be NSFW.
Clik here to view.

Why is phpunit skipping most of my tests even though their dependency succeeded?

I have a PHPUnit test that looks something like this:/** * @dataProvider provideSomeStuff */public function testSomething($a, $b, $c){ ...}/** * @dataProvider provideSomeStuff * @depends testSomething...

View Article


Image may be NSFW.
Clik here to view.

Can I configure nvim-lspconfig to fail silently rather than print a warning?

Over time I'm adding more and more language servers in nvim. This is starting to get somewhat annoying when I use nvim outside of a project context on a filetype that I don't have an LSP globally...

View Article

Is there a module equivalent of Python's argparse for node.js?

argparse for python makes it quick and easy to handle command-line input, handling positional arguments, optional arguments, flags, input validation and much more. I've started writing applications in...

View Article

Why isn't my Exception being caught by catch? [duplicate]

I have some code that looks like this# Try to import filetry{ DataManager::fileImport($_FILES['datafile']['tmp_name'], $_POST['zones'], $_POST['statuses']);}catch(Exception $e){ print 'Herp.';...

View Article
Browsing all 42 articles
Browse latest View live