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

Comment by Schwern on What's the standard Go approach to mapping values from...

If you just want standard string formatting for each type, switch field.Kind() ... can be replaced with record = append(record, fmt.Sprintf("%v", field)). for i := range inputs { value :=...

View Article


Comment by Schwern on How to fetch tags from github

I cannot reproduce your problem. git clone https://github.com/emacs-exwm/exwm.git; git tag lists all tags. Check your Git config for anything related: git config --list --show-origin. By default, tags...

View Article


Comment by Schwern on wrong version of sqlite3 required for ruby on rails

checking for dlopen()... no missing function dlopen That's the actual error. The solution is here.

View Article

Comment by Schwern on better way to use rails activerecord query

You can check how many queries are run in your logs.

View Article

Comment by Schwern on better way to use rails activerecord query

One can expand on this by adding a join table between Organization and Users, this allows Users to be in more than one Organization, have more than one role in an Organization, and allows multiple...

View Article


Comment by Schwern on Can't run Rails in production mode on host

How do your dev and production environments differ? Is there an error? What's in your production logs? How are your production and development configs different? Any special production gems in your...

View Article

Answer by Schwern for declare alternative value for specific lookup values...

Start by left joining with the alias table to get the missing item codes; we use a left join because we want the result to contain every row in pricing even if it has no match. Match the itemcode with...

View Article

Comment by Schwern on How to install MySQL 5.7 on MacOS in 2025

Support for MySQL 5.7 ended in Oct 2023. MacPorts still has it, but you should probably upgrade to MySQL 8 or 9 as MTilsted suggests.

View Article


Comment by Schwern on Type conversion Postgresql

You likely have some oddly formatted dates in filedate that happened to work in v15 and no longer in v16. For example, v16 [removed] undocumented support for date input in the form YyearMmonthDday...

View Article


Answer by Schwern for Is there a correct folder/file structure for request...

spec/requests is the default. From the docs...Request specs are marked by type: :request or if you have set config.infer_spec_type_from_file_location! by placing them in spec/requests.There is no clear...

View Article

Answer by Schwern for Is there a way to convert sha256 to md5 hashing

Simple answer: no.Long answer: you could try cracking the hashed passwords, but this takes a lot of time and will only recover easily guessed passwords. However, you may be able to use the old hashed...

View Article

Comment by Schwern on Custom URL without using www

We need more information. If you tell us your domain we could look at its public DNS records. Also, there's more to routing from example.com to your web server than just the DNS records, but that...

View Article

Comment by Schwern on Git subtree conflict resolution

@Victor You have one repo which depends on another repo? This is a job for a dedicated dependency manager, which one depends on your programming language. Looks like C# so NuGet. They can often pull...

View Article


Comment by Schwern on declare alternative value for specific lookup values...

1) DECLARE @DefaultCustomerLevel INT = 5 This definitely is not PostgreSQL. Please verify what database you're using. It looks like Microsoft SQL Server. 2) Please don't add extra parts to your...

View Article

Comment by Schwern on Moved repo to an organization on github and now I can't...

1) If you log into github.com in a browser as myuser, can you see the repository? Can you edit and commit the repo on github.com? 2) Can you clone the repository? 3) Are you absolutely sure you're...

View Article


Comment by Schwern on Golang map equivalent to postgres tstzrange and...

1) Could you provide some sample Go code and data showing how you'd like this to work? 2) "By the way I'm using int64 timestamps instead of time.Time." To be sure I understand, this is just about...

View Article

Answer by Schwern for Golang map equivalent to postgres tstzrange and...

By the way I'm using int64 timestamps instead of time.Time.This isn't actually about time at all, we can drop that. You want to look up integers within a given range.Rather than trying to make up your...

View Article


Comment by Schwern on declare alternative value for specific lookup values...

@Siege I offered two solutions, temp tables and CTE/with. In fact, your big query is doing it with a subquery FROM (VALUES ('22rgr45dhs'),('35rg4pcpab'),('37rgtf08ab'),('37RGDF10BS'), ('27MIETE11K'))...

View Article

Comment by Schwern on declare alternative value for specific lookup values...

1) DECLARE @DefaultCustomerLevel INT = 5 This definitely is not PostgreSQL. Please verify what database you're using. It looks like Microsoft SQL Server. 2) Please don't add extra parts to your...

View Article

Comment by Schwern on Create an index with concatenation of text fields,...

I second Richard's comment, character is a red flag. You almost always want text. See postgresql.org/docs/current/datatype-character.html

View Article
Browsing all 581 articles
Browse latest View live


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