Quantcast
Channel: User Schwern - Stack Overflow
Browsing all 581 articles
Browse latest View live
↧

Comment by Schwern on How to architecturally effectively spawn Perl processes...

@tomypro I agree with ikegami, what you describe doesn't make sense. Could be a misunderstanding of how FastCGI works. We need something concrete. Can you make a simplified version of your application...

View Article


Comment by Schwern on Can SQLITE database files used for attacking?

For the purposes of your question, can we assume you've applied all the recommendations from SQLite Defense Against The Dark Arts?

View Article


Comment by Schwern on Why is the query statement different with and without...

What results are you seeing? Could you give us some sample data and the results?

View Article

Comment by Schwern on mysql server does not start after 2038

@TangentiallyPerpendicular Making sure your software is 2038-safe now is prudent. Organizations are very bad at upgrading, there will be a lot of MySQL 8.0 databases running in 2038.

View Article

Comment by Schwern on How do I find my Path to add into .env file on github...

It is explained in the very next step. Which step are you having trouble with?

View Article


Comment by Schwern on Psql giving permission denied on loading via file

"I connect using: sudo -i -u postgres" This does not connect to Postgres, it creates a login shell as the postgres user. Presumably you then run psql? Show us that command, please. You shouldn't have...

View Article

Comment by Schwern on Psql giving permission denied on loading via file

To expand, the postgres user can't access /home/sheharyar/bot/code/data.sql because it (presumably) does not have permission to traverse the /home/sheharyar/ directory (the x permission). Even if it...

View Article

Answer by Schwern for using submodules locally (git)

There just isn't any support in git for adding submodules that are on the local drive...No, this is a general Git security setting.fatal: transport 'file' not allowedThis is the default behavior for...

View Article


Comment by Schwern on Why do Ruby ERB if statements set variables to nil?

Triple check that is the code you're actually executing.

View Article


Comment by Schwern on How to find user place in DB

Your user ids are unique. There's no need to group by user id because each user id can only have one row.

View Article

Answer by Schwern for Performance of the tokio-postgres driver in rust on...

jdbc test shows that 10 users can make 15705 rps (during 120s), and this code - 2850 rps. ConnectionPool is equal. Java better?It wouldn't be a blanket statement like "Java is better faster", but many...

View Article

Comment by Schwern on VSC extension Git Graph doesnt display gitlab project

"grit graph"? What extension, exactly?

View Article

Answer by Schwern for access concern method in a rails activeJob

include GenericMethods should simply go inside class SomeJob. Not inside a method. Then it injects its methods when the class loads.class SomeJob < ApplicationJob include GenericMethods queue_as...

View Article


Answer by Schwern for Why does `git bisect skip` cause it to fail to find the...

git bisect uses a binary search algorithm to efficiently find the commit which broke the build. However, having commits which won't build at all breaks that.Consider if your commits are like so...1P -...

View Article

Answer by Schwern for Unable to reproduce primary key error on 'create if not...

This is a classic race condition, "check then do". Consider what happens if two database connections try to do the same thing at roughly the same time.Connection AConnection Bif not exists...if not...

View Article


Comment by Schwern on How to architecturally effectively spawn Perl processes...

@tomypro I agree with ikegami, what you describe doesn't make sense. Could be a misunderstanding of how FastCGI works. We need something concrete. Can you make a simplified version of your application...

View Article

Answer by Schwern for How to find the size of a table in bytes in Ruby on Rails?

There's little benefit to putting it in the application which is using the database, it just complicates the application. Usually this information would be monitored by a tool outside the...

View Article


Answer by Schwern for plpgsql does not handle exception

For select to raise NO_DATA_FOUND you must use the strict option. The intent is when you expect exactly ONE row to be returned.If the STRICT option is specified, the command must return exactly one row...

View Article

Answer by Schwern for How to prevent password from being updated if blank in...

You could add a before_updatecallback to your model to strip blanks.class User before_update -> { self.restore_password! if self.password.blank? } ...endHowever, model callbacks can cause problems,...

View Article

Comment by Schwern on How to prevent password from being updated if empty in...

@ChiaraAni Did you try it?user.update!(password: nil) and user.update!(password: "") and user.update!(password: " ") will all fail the validation, but user.update(name: 'Joana') works fine because the...

View Article
Browsing all 581 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>