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

Comment by Schwern on Git workflow to overwrite remote commits with local ones

@Mark In that case, git revert them. It's much safer and you don't have to coordinate with everyone.

View Article


Comment by Schwern on Mysql 8.0.35 - I cannot get rid of filesort caused by a...

@Akina It is unnecessary, but removing it won't have an affect on the query plan.

View Article


Comment by Schwern on How to add a commit describing a git filter-repo...

@GeoffAlexander If the question is "how can I make Git track renames" the short answer is "you can't", this answer is the long answer. If you told us why you want to make Git track renames, we could...

View Article

Comment by Schwern on Before I could do a push in git but now I can’t

@user23714456 You can reply to specific users like so.

View Article

Comment by Schwern on Everytime after pc restart, i cant fetch or push to a...

Leave a comment if those answers don't help.

View Article


Comment by Schwern on Need to recover from multiple errant `git reset` commands

@j6t They look the same to me.

View Article

Comment by Schwern on What is the typical method for preventing duplicates in...

Is {"stuff", "pasta"} the same recipe as '{"pasta", "stuff"}'?

View Article

Comment by Schwern on With Action Cable, test that many messages are broadcast

You can use capture_broadcasts with rspec and get it down to: expect(messages).to eq ['first', 'second', 'third']

View Article


Comment by Schwern on Git Merge Request to Feature Branch Includes Many Old...

Can we see the relevant parts of git log --graph --decorate --all --oneline? This will show your true history of master, BranchA, featureBranch. Please be sure to sanitize the commit logs so you're not...

View Article


Comment by Schwern on What realloc() actually does in this code?

@chiranjeevi_dk There are many, many, many, many reasons why you might get an error from C code. Sometimes things which are errors on one machine aren't in others, or an error appears and disappears...

View Article

Comment by Schwern on How to create a typed child table?

You can't combine create table x of y with create table x (...) inherits (y). What is your expected result here?

View Article

Comment by Schwern on Couldnot install perl module using cpanm command

Works For Me(tm) with Strawberry 5.38.0.

View Article

Answer by Schwern for Redshift 1:1 left join on right table with duplicates

First, give the student's GPAs an order using the row_number window function. select student_id, gpa, row_number() over ( partition by student_id order by gpa_at desc ) as rownum from gpaThen we can...

View Article


Answer by Schwern for User defined function only returns first value in column

From what you described, seems like the function should only be formatting a value.create or replace function format_as_money(m float) returns text language sql immutable returns null on null input...

View Article

Answer by Schwern for If you are using "vi.mock" factory, make sure there are...

From the vi.mock documentation...vi.mock is hoisted (in other words, moved) to top of the file. It means that whenever you write it (be it inside beforeEach or test), it will actually be called before...

View Article


Answer by Schwern for C function gives wrong result when function call on...

factorial(scanf("%lu", &n)) says to pass the return value of scanf into factorial. The return value is the number of items scanned, which in this case is always going to be 0 or 1.It's as if you...

View Article

Answer by Schwern for Hi! Can someone please help me figure out why and how...

You have to read it from the outside in. It helps to space it all out.TRIM( leading '(' FROM LEFT( location, POSITION(',' IN location) - 1 ))POSITION(',' IN location) returns the offset of the first ,...

View Article


Answer by Schwern for File in the same path, one can be git trace but others...

From the gitignore docs...It is not possible to re-include a file if a parent directory of that file is excluded.* has ignored everything at the top-directory (*.* is unnecessary) including dir_b. You...

View Article

Answer by Schwern for How to generate a 16-digit robust not guessable coupon...

Ruby master (what may become 3.4) introduces a more robust formatting interface for SecureRandom. It's present in Ruby 3.3, but it does not appear to be fully baked. SecureRandom in 3.3.0 claims to...

View Article

Answer by Schwern for How to make comments on Github without being collaborator?

Unless you've explicitly limited it, anyone who can read your repository can review a pull request or comment on a commit.After a pull request is opened, anyone with read access can review and comment...

View Article
Browsing all 581 articles
Browse latest View live


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